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

fix: incorrectly set cookie's expires value in login.js #1049

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

Promix953
Copy link
Contributor

@Promix953 Promix953 commented Jan 2, 2025

When writing a cookie using document.cookie, the expires value should use the UTCString format.

https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie

If expires is set incorrectly, the cookie will expire at the end of session and thumbnail will fail to load.

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.64%. Comparing base (c58c355) to head (f0c9539).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1049   +/-   ##
=======================================
  Coverage   34.64%   34.64%           
=======================================
  Files          61       61           
  Lines        5499     5499           
=======================================
  Hits         1905     1905           
  Misses       3359     3359           
  Partials      235      235           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@fmartingr fmartingr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Promix953, thank you for taking your time and fixing this issue. Right now it looks good but later on I'm going to provide the ISO directly on the login/refresh APIs to keep that kind of logic out of the frontend. Thank you!

@fmartingr fmartingr merged commit b9db270 into go-shiori:master Jan 3, 2025
12 of 14 checks passed
@Promix953 Promix953 deleted the fix-cookie-expires branch January 3, 2025 10:22
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

Successfully merging this pull request may close these issues.

2 participants