main
← small-lovely-cat:fix/loading-loop
opened 08:32AM - 15 Oct 25 UTC
For these steps:
1. Login as a user, and read a topic;
2. The admin/moderator … removes the topic;
3. Go up/down and trigger the fetch of the former/latter page.
Then the page will stuck in an infinite loading, with the console showing `403 forbidden` getting `/t/${this.topic.id}/posts.json`. And if the website is protected by a waf, then the user will be banned from visiting it.
This commit fix this by adding a callback to refresh the whole page when ajax returned 403, and then the user will see a 404 page.
<img width="881" height="612" alt="image" src="https://github.com/user-attachments/assets/14e5db5b-cf6b-4b68-948c-44dd1de81450" />
For these steps:
Login as a user, and read a topic;
The admin/moderator removes the topic;
Go up/down and trigger the fetch of the former/latter page.
Then the page will stuck in an infinite loading, with the console showing 403 forbidden
getting /t/${this.topic.id}/posts.json
. And if the website is protected by a waf, then the user will be banned from visiting it.
「いいね!」 1
pmusaraj
(Penar Musaraj)
2025 年 10 月 15 日午後 2:28
2
This seems reasonable to me, thanks for the PR.
What does the user see once the page is reloaded, a message along the lines of “Sorry, this page is forbidden/private”?