Skip to content
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

Various API routes return 401 error with valid token #266

Closed
requ1Re opened this issue May 18, 2024 · 3 comments
Closed

Various API routes return 401 error with valid token #266

requ1Re opened this issue May 18, 2024 · 3 comments

Comments

@requ1Re
Copy link

requ1Re commented May 18, 2024

Description

While testing the API, I found out that multiple routes return missing, malformed, expired or otherwise invalid token provided errors (status code 401) even if you use valid, full-permission API tokens. For example, getting a project background (using GET /api/v1/projects/{id}/background) does always yield me this error, even on the try.vikunja.io-instance and if the project has an user-uploaded background. Another route which does not work is /api/v1/routes, for example. I think there are even more than that.

There was a similar issue, but that has since been closed as completed: #105

Vikunja Version

v0.23.0

Browser and version

n/a

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

image
@kolaente
Copy link
Member

/routes is not supposed to work, as there is no permission for it. The route is only really used for the form in the frontend when creating a token.

Should the project background be a separate permission or an existing one like project read?

@requ1Re
Copy link
Author

requ1Re commented May 23, 2024

It should probably be part of the project read permission. I would've guessed API keys with "full permissions" (aka. all permission checkboxes checked) would have access to everything anyways.

I think there was another route (not /routes) which had the same error, I am not sure which it was though.

@kolaente
Copy link
Member

kolaente commented Jun 3, 2024

Now fixed in 99a67e0. There are now new permissions for all routes, except user settings. Please check with the next unstable build (should be ready for deployment in ~45min, also on try).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants