Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/login 可能会被页面的别名覆盖掉 #6893

Open
ruibaby opened this issue Oct 18, 2024 · 2 comments
Open

/login 可能会被页面的别名覆盖掉 #6893

ruibaby opened this issue Oct 18, 2024 · 2 comments
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.

Comments

@ruibaby
Copy link
Member

ruibaby commented Oct 18, 2024

系统信息

使用的哪种方式运行?

Docker

发生了什么?

测试发现,Halo 的页面功能可以覆盖掉 /login 路由,可能会导致无法再正常访问 /login 页面。建议禁止系统保留的路由名称,或者支持安全模式(开启之后不允许主题覆盖 /login,不允许页面路由覆盖 /login)。

/kind improvement
/area core

复现步骤

No response

相关日志输出

No response

附加信息

No response

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. area/core Issues or PRs related to the Halo Core labels Oct 18, 2024
@JohnNiang
Copy link
Member

可以尝试将下面这行中的 login 修改为 plugin:system:login

@guqing
Copy link
Member

guqing commented Oct 18, 2024

可以尝试将下面这行中的 login 修改为 plugin:system:login

halo/application/src/main/java/run/halo/app/security/preauth/PreAuthLoginEndpoint.java

Line 102 in c465bf8

ServerResponse.ok().render("login", Map.of(

这个方法不行,这是页面的路由优先级高导致轮不到这里

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

No branches or pull requests

3 participants