The-NeXT-Project / NeXT-Panel

Next generation proxy service management system (OSS Edition)
https://nextpanel.dev
GNU General Public License v3.0
167 stars 39 forks source link

[BUG] 重置密码时路径问题 #43

Closed Corpama closed 5 months ago

Corpama commented 5 months ago

Environment 环境

OS: Ubuntu22.04 HTTPS enabled: 是 PHP version: php8.3-fpm DB version: 11.2.3-MariaDB Redis version: redis-cli 7.0.12 Commit:

Bug Info

在重置密码时,比如:https://example.com/password/token/some_token 当填写好密码后点击重置,发现发送的post请求中,路径原本应该是'/password/token/some_token'的,但是发起的请求却是'/password/token/{ location.pathname }' 辛苦看看token.tpl中是不是这个部分有问题:hx-post="{ location.pathname }" 导致重置密码的时候永远都是链接无效,在redis中观察可以发现发起的请求都是:"GET" "password_reset:{ location.pathname }"

AutisticShark commented 5 months ago

Because there is something wrong with the whole implementation, it shouldn't be calling a javascript function inside the hx-post attribute.

AutisticShark commented 5 months ago

Fixed in d646b4ff2a550e65d40968fa9abfeca41a97ed10.