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" />
Para estas etapas:
Faça login como um usuário e leia um tópico;
O administrador/moderador remove o tópico;
Vá para cima/baixo e acione a busca pela página anterior/seguinte.
Então a página ficará presa em um carregamento infinito, com o console mostrando 403 forbidden ao obter /t/${this.topic.id}/posts.json. E se o site for protegido por um WAF, o usuário será banido de visitá-lo.
1 curtida
pmusaraj
(Penar Musaraj)
Outubro 15, 2025, 2:28pm
2
Isso me parece razoável, obrigado pela PR.
O que o usuário vê quando a página é recarregada, uma mensagem como “Desculpe, esta página é proibida/privada”?
1 curtida
Sim, os usuários verão uma mensagem como esta.
Assim como uma página 404 normal.
Oops! A página não existe ou não está acessível publicamente.
Leve-me para casa
1 curtida
pmusaraj
(Penar Musaraj)
Outubro 16, 2025, 6:09pm
4
Obrigado @small-lovely-cat , seu PR foi mesclado.
1 curtida
pmusaraj
(Penar Musaraj)
Fechado
Outubro 20, 2025, 12:00pm
5
Este tópico foi fechado automaticamente após 3 dias. Novas respostas não são mais permitidas.