From f0c953994014ee0ff006441a9beb862cb83a7167 Mon Sep 17 00:00:00 2001 From: Pr0m1x Date: Thu, 2 Jan 2025 18:35:58 +0800 Subject: [PATCH] fix: incorrectly set cookie's expires value in login.js --- internal/view/assets/js/component/login.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/view/assets/js/component/login.js b/internal/view/assets/js/component/login.js index e75925556..f8ddf7bf8 100644 --- a/internal/view/assets/js/component/login.js +++ b/internal/view/assets/js/component/login.js @@ -130,10 +130,10 @@ export default { // Save session id document.cookie = `session-id=${json.message.session}; Path=${ new URL(document.baseURI).pathname - }; Expires=${json.message.expires}`; + }; Expires=${new Date(json.message.expires * 1000).toUTCString()}`; document.cookie = `token=${json.message.token}; Path=${ new URL(document.baseURI).pathname - }; Expires=${json.message.expires}`; + }; Expires=${new Date(json.message.expires * 1000).toUTCString()}`; // Save account data localStorage.setItem("shiori-token", json.message.token);