[GH-ISSUE #394] 终端鉴权优化 #3326

Closed
opened 2026-02-28 11:55:35 +03:00 by kerem · 4 comments
Owner

Originally created by @Naochen2799 on GitHub (May 15, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/394

https://yourdomain.com/#/terminal
没有终端相关的鉴权,存在被滥用的风险。
注:包括demo站点!

Originally created by @Naochen2799 on GitHub (May 15, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/394 https://yourdomain.com/#/terminal 没有终端相关的鉴权,存在被滥用的风险。 注:包括demo站点!
kerem 2026-02-28 11:55:35 +03:00
Author
Owner

@0xJacky commented on GitHub (May 15, 2024):

我不清楚您是如何认为我们没有做终端鉴权的
github.com/0xJacky/nginx-ui@189f623994/router/routers.go (L66-L70)

后端需要通过 token 验证才可以进入 web 终端,其次,我在文档中有注明使用 login 作为启动命令,这样相当于可以多套一层 linux 的用户认证
https://nginxui.com/zh_CN/guide/config-server.html#startcmd
image

在未登录的情况下,访问 yourdomain.com/#/termainal 也有前端的路由守卫,跳转至 #/login

github.com/0xJacky/nginx-ui@189f623994/app/src/routes/index.ts (L307)

<!-- gh-comment-id:2112885026 --> @0xJacky commented on GitHub (May 15, 2024): 我不清楚您是如何认为我们没有做终端鉴权的 https://github.com/0xJacky/nginx-ui/blob/189f6239940b5893a3cc639951680e1f880c74f2/router/routers.go#L66-L70 后端需要通过 token 验证才可以进入 web 终端,其次,我在文档中有注明使用 login 作为启动命令,这样相当于可以多套一层 linux 的用户认证 https://nginxui.com/zh_CN/guide/config-server.html#startcmd <img width="795" alt="image" src="https://github.com/0xJacky/nginx-ui/assets/13096985/6877a605-651c-4529-aa7f-5096006bbc43"> 在未登录的情况下,访问 yourdomain.com/#/termainal 也有前端的路由守卫,跳转至 #/login https://github.com/0xJacky/nginx-ui/blob/189f6239940b5893a3cc639951680e1f880c74f2/app/src/routes/index.ts#L307
Author
Owner

@Naochen2799 commented on GitHub (May 15, 2024):

我没有完整的阅读文档,忽略了Linux默认的用户名和密码进行验证。
但是目前的demo网站似乎也没有添加额外的授权,可能存在风险

<!-- gh-comment-id:2112892804 --> @Naochen2799 commented on GitHub (May 15, 2024): 我没有完整的阅读文档,忽略了Linux默认的用户名和密码进行验证。 但是目前的demo网站似乎也没有添加额外的授权,可能存在风险
Author
Owner

@0xJacky commented on GitHub (May 15, 2024):

因为 demo 为了展示,所以直接用的 bash 作为启动命令

<!-- gh-comment-id:2112894862 --> @0xJacky commented on GitHub (May 15, 2024): 因为 demo 为了展示,所以直接用的 bash 作为启动命令
Author
Owner

@0xJacky commented on GitHub (May 15, 2024):

后续会增加设置,禁用 WebTerminal,以及二步验证等

<!-- gh-comment-id:2112897910 --> @0xJacky commented on GitHub (May 15, 2024): 后续会增加设置,禁用 WebTerminal,以及二步验证等
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#3326
No description provided.