The value of hashed-password can be used to open CodeServer directly, which has security problem
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
调研方向
首先跟踪 ~/.config/code-server/config.yaml 中的 auth 设置是如何读取的,以及登录页面之后如何验证 code-server-session cookie。使用列出的 code-server 命令和 jupyter_server_proxy URL 重现该行为,然后验证 hashed-password 值本身无法对会话进行身份验证。
由索引模型根据 Issue 内容生成。
描述
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Chrome 143.0.7499.170
- Local OS: windows
- Remote OS: ubuntu 22.04, jupyterlab service
- Remote Architecture: x86
code-server --version: v4.108.0
Steps to Reproduce
- prepare "hashed-password" using command
echo -n "xxx" | npx argon2-cli -e - edit ~/.config/code-server/config.yaml,auth: password, hashed-password:"$argon2i$v=19$m=4096,t=3,p=1$xxx$xxx"
- start code-server using command
code-server --port 7756 - using jupyter_server_proxy to visit code-server service, concatenate a URL as https://base_url/proxy/7756/
- when the code-server login page occurs, skip input the xxx into the password area. F12 edit the application cookie, set key=code-server-session, value="$argon2i$v=19$m=4096,t=3,p=1$xxx$xxx", refresh the browser
Expected
Failed to login into the code-server. The hashed-password in the config.yaml should not be the plain credentials
Actual
successfully login into the code-server
- 主要语言
- TypeScript
- 星标
- 79.4k
- 派生
- 6.9k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 39
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/code-server 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
coder/code-server#8017 · 2 条评论 ·
-
security
难度 2/5 1-3 小时 新手友好度 74/100
coder/code-server#8013 · 4 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
coder/code-server#7976 · 2 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
coder/code-server#7962 · 3 条评论 ·
-
bug needs-investigation
难度 4/5 3-5 天 新手友好度 55/100
coder/code-server#7955 · 1 条评论 ·
查看 coder/code-server 的全部 Issue
相似的 Issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
supermomonga/zcode-acp#24 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
growthbook/growthbook#7100 ·
-
triage
难度 1/5 1-3 小时 新手友好度 88/100