Skip to content

Commit

Permalink
Require authorization for json and yml prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchamp committed Mar 18, 2024
1 parent 267ad44 commit f0316f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openlibrary/plugins/openlibrary/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class PreferenceProcessor:
"""Processor to handle unauthorized patron preferece reads"""

def __init__(self):
self.pref_pattern = re.compile('^\/people\/([^/]+)\/preferences$')
self.pref_pattern = re.compile('^\/people\/([^/]+)\/preferences(.json|.yml)?$')

Check failure on line 95 in openlibrary/plugins/openlibrary/processors.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (W605)

openlibrary/plugins/openlibrary/processors.py:95:42: W605 Invalid escape sequence: `\/`

Check failure on line 95 in openlibrary/plugins/openlibrary/processors.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (W605)

openlibrary/plugins/openlibrary/processors.py:95:50: W605 Invalid escape sequence: `\/`

Check failure on line 95 in openlibrary/plugins/openlibrary/processors.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (W605)

openlibrary/plugins/openlibrary/processors.py:95:59: W605 Invalid escape sequence: `\/`

def __call__(self, handler):
if self.pref_pattern.match(web.ctx.path):
Expand Down

0 comments on commit f0316f6

Please sign in to comment.