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
fix: Make Sipi handle multiple KnoraAuthentication*
cookies correctly (DEV-2271)
#2713
Conversation
…ly (DEV-2271) * Cookies in production are visible for and Sipi could not handle multiple cookies * Implement _get_jwt_token_from_cookie by parsing the cookies header value, because Sipis server.cookies implementation is broken https://linear.app/dasch/issue/DEV-2271/sometimes-you-get-a-404-error-when-you-want-to-open-a-media-file
DEV-2271 Sometimes you get a 404 Error when you want to open a media file
Screenshot 2023-06-12 at 07.07.14.png Happens mostly on Chrome, when the cache and cookies aren't cleaned Good example projects = Fagottini and Aura-Effizienz. Type of media file: videos, PDFs, sometimes with ZIP archives and images Happens in all environments (prod, staging, dev, test) Screenshot 2023-06-12 at 08.39.44.png Screenshot 2023-06-12 at 08.40.20.png From Flavie's computer: VIDEO PDF: the same message "Invalid token, unable to decode jwt" is displayed when double-clicking on the 401 error URL on prod: https://admin.dasch.swiss/project/hp1UIqpKS_Kc7j0c5wh5jA/ontology/fagottino/Video |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully understand the implications of the changes you did to strings.lua
, but I trust you on that, and otherwise it looks good
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2713 +/- ##
===========================================
+ Coverage 17.89% 82.38% +64.48%
===========================================
Files 277 279 +2
Lines 28855 28936 +81
===========================================
+ Hits 5165 23838 +18673
+ Misses 23690 5098 -18592
☔ View full report in Codecov by Sentry. |
Added some new lines to the |
makes sense, thanks for the explanation :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
3c12e39
to
d730012
Compare
Pull Request Checklist
Task Description/Number
Issue Number: DEV-2271
_get_jwt_token_from_cookie
by parsing the cookies header value, because Sipis server.cookies implementation is broken (only returns a single cookie value which contains the others even if multiple cookies are present)Basic Requirements
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR change client-test-data?