-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Require apikey even when access control is disabled #516
Comments
Err....
Which git commit are you running there? |
$ ./run --version I suspect the difference (tested and provided it on my side) is this: $ cat .octoprint/config.yaml If accessControl is enabled it is protected. If disabled is isn't. |
Actual test whether key is provided or not happens in before_request handler of flask app, hence the more granular processing in the decorator was unecessary since around november '14. Adjusted to only do the actual processing necessary to replicate login_required behaviour/login users if necessary. Closes #516 (actually, that was solved since introduction of the before_request handler which took that work off the hands of the decorator, but now it's properly documented too)
This has actually been fixed since 254145d but I only just noticed when I wanted to tackle this issue here. Took the opportunity to also slightly refactor things. But should be solved in current |
Doing the following results in a HTTP/1.1 200 and the log file:
$ curl -D - 'http://10.0.0.9/downloads/logs/octoprint.log'
Where other API calls without the ?apikey= result in a HTTP/1.1 401
$ curl -D - 'http://10.0.0.9/api/logs/octoprint.log'
I assume this isn't intended behavior, as it isn't expected nor documented behavior.
The text was updated successfully, but these errors were encountered: