Skip to content

Parameter disable_for does not work (as expected) #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BerengarWLehr opened this issue Apr 30, 2025 · 2 comments · Fixed by #357
Closed

Parameter disable_for does not work (as expected) #356

BerengarWLehr opened this issue Apr 30, 2025 · 2 comments · Fixed by #357
Labels
bug Something isn't working

Comments

@BerengarWLehr
Copy link
Contributor

Regarding the paramter disable_for of AppAPIAuthMiddleware applied in

if not fnmatch.filter(self._disable_for, url_path):

If you want to define a list of patterns of urls that should be ignored than you need to iterate over this list as the functions signature is

fnmatch.fnmatch(names, pattern)

(and not as one might expect

fnmatch.fnmatch(patterns, name)

see https://docs.python.org/3/library/fnmatch.html#fnmatch.filter)

@bigcat88 bigcat88 added the bug Something isn't working label May 1, 2025
bigcat88 pushed a commit that referenced this issue May 1, 2025
Correct usage of fnmatch for ignoring some paths

Fixes #356 .

Signed-off-by: Berengar W. Lehr <Berengar.Lehr@uni-jena.de>
@BerengarWLehr
Copy link
Contributor Author

Do you already have plans when this fix will be released?

@bigcat88
Copy link
Member

bigcat88 commented May 6, 2025

Do you already have plans when this fix will be released?

The fix is live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants