[PR #566] [MERGED] Use UTC for cookie expiry date in backend #671

Closed
opened 2026-02-25 23:35:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/566
Author: @MoX46
Created: 2/1/2023
Status: Merged
Merged: 2/5/2023
Merged by: @fmartingr

Base: masterHead: master


📝 Commits (1)

  • 0a0ebac use UTC for cookie expiry date in backend

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 internal/webserver/handler-api.go (+1 -1)

📄 Description

Issue:
Logging in to the web UI for the first time resulted in 301 redirect on v1.5.4. Only seems to be an issue on chromium based browsers (Brave, Chrome, Edge). Not an issue on Firefox as far as I can tell.

Solution:
JavaScript documents indicate cookie expires attribute should be UTC format . After cba5046 expiry date is returned in local time format instead of UTC. Updating backed to explicitly use UTC resolves the issue.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/566 **Author:** [@MoX46](https://github.com/MoX46) **Created:** 2/1/2023 **Status:** ✅ Merged **Merged:** 2/5/2023 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`0a0ebac`](https://github.com/go-shiori/shiori/commit/0a0ebac2e75cd9ea28ff70335130efe0556030cb) use UTC for cookie expiry date in backend ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/webserver/handler-api.go` (+1 -1) </details> ### 📄 Description **Issue:** Logging in to the web UI for the first time resulted in 301 redirect on v1.5.4. Only seems to be an issue on chromium based browsers (Brave, Chrome, Edge). Not an issue on Firefox as far as I can tell. **Solution:** [JavaScript documents indicate cookie expires attribute should be UTC format ](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie). After cba5046 expiry date is returned in local time format instead of UTC. Updating backed to explicitly use UTC resolves the issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:35:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#671
No description provided.