From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1741447280; bh=e0FmFMP9ywPXaNTDJQziAvgJ6JSoGDy7uksrUAZysXQ=; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:Message-ID:Date:From:Reply-To:Subject:To: Cc:In-Reply-To:References:Resent-Date:Resent-From:Resent-To: Resent-Cc:User-Agent:Content-Type:Content-Transfer-Encoding; b=oK0OGT9NBYzOZD+jl85oFYqqyN9vQFadZEv2D5w68nrJRzH3ALzFqQuDBE2bCZhLO F4+QfCKJF9LaQjfH1808wn5HsPPMEmb07zkd7IFqwt3bxBa/uKXlV8+EfbsF2DSfR3 yjda/ovQxv4BXnry6qb86scNlO1oaMZ04GUnymBcP2d+43ANKvf3f91r6+gbvWYYE1 Vp96IvBNsGS+ycmeeCiZ4JHD6QwYzzVYYO7X/N4vzrTJvewCU8z5lZQ1MUdyouP3kQ ulQZBZC3pSrYdbNIf9gnAS6Ss5baBy7LnnMdEOBHb6RIRk61TY2N9qBwFwTsFhoKYO nlYONmDs1lOfw== Received: from [192.168.1.8] (unknown [101.128.125.112]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id D30A320B4921; Sat, 8 Mar 2025 15:21:19 +0000 (UTC) Message-ID: <175df483-52a4-4bc1-91e2-43ea2e2619c4@gnuweeb.org> Date: Sat, 8 Mar 2025 22:21:09 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 00/10] Relative Path, Delete Avatar, Sidebar, Toast To: Ammar Faizi Cc: Alviro Iskandar Setiawan , GNU/Weeb Mailing List References: <20250307192622.1172-1-kiizuha@gnuweeb.org> <9ff81469-404e-475d-a4e7-ad198c271078@gnuweeb.org> Content-Language: en-US From: Muhammad Rizki In-Reply-To: <9ff81469-404e-475d-a4e7-ad198c271078@gnuweeb.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: On 08/03/2025 22:18, Ammar Faizi wrote: > On 3/8/25 2:26 AM, Muhammad Rizki wrote: >> Hello, >> This series fixes relative path, fixes social fields, add delete avatar >> method, change sidebar menu look, change toast message position and >> use richColors. >> >> Give it a test and let me know if there's any issue, thanks. > > I tried to apply it on mail-staging.gnuweeb.org. And it makes the > current active session no longer works. It shows "500 Internal Error". > > Checking on network tab, the header it sends is: > >     Authorization: Bearer null > > Local storage inspection: > > JSON.stringify(localStorage) > '{"gwm_token":"null","gwm_token_exp_at":"1742402878","gwm_uinfo":"{\ > \"id\\":2,\\"full_name\\":\\"Ammar Faizi\\",\\"gender\\":\\"m\\",\ > \"username\\":\\"ammarfaizi2\\",\\"ext_email\\":\ > \"ammarfaizi2@gmail.com\\",\\"role\\":\\"admin\\",\\"is_active\\":\\"1\ > \",\\"socials\\":{\\"github_username\\":\\"ammarfaizi2\\",\ > \"telegram_username\\":\\"ammarfaizi2\\",\\"twitter_username\\":\ > \"ammarfaizi2\\",\\"discord_username\\":\\"ammarfaizi2\\"},\\"photo\\":\ > \"https://mail.gnuweeb.org/api.php? > action=fetch_photo&f=5oGoBUc31xCxK%2FFoBUk4B8Nt9ZcZ3f%2B7dwfDIPPf9vYTyh2ziSDL%2Bt1ZJ3lmjnHlQBBsTkAMkQsEGZ2n9sEdnREmFgolrSfQImYLIzLmQ%2Bo%3D\\"}"}' > > Take a look at the "gwm_token" here, it's set to "null" as a string. > That seems off. How do you determine if "gwm_token" is empty? > > Testing in incognito mode works fine, but for active sessions, it > breaks and doesn't recover automatically. Instead, it continuously > throws a 500 Internal Server Error. > > The only way to fix it is by manually clearing localStorage, which > is far from ideal. > > The app should immediately log the user out upon receiving a > "401 Unauthorized" response. > can you try to clear the localStorage? it could be because of previous state of user_info is not synchronized with current API structure.