user create --password-stdin keeps a byte order mark as part of the password
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 ConsoleCommandInput.ReadLineAsync 开始,它读取 Console.In,并在报告中被指出是标记存活的位置;还要检查它在 src/FluentCMS.Host 下 user create 和 user reset-password --password-stdin 路径中的调用方。通过将带 BOM 前缀的行管道到命令中来复现,然后从重定向输入读取的第一行中去除开头的 U+FEFF,并将其余部分按 UTF-8 解码。完成意味着带 BOM 前缀的管道可以登录,并且现有的 host 命令测试仍然通过;添加一个覆盖 BOM 情况的测试。
由索引模型根据 Issue 内容生成。
描述
What happens
On Windows, a password piped from PowerShell to fluentcms user create --password-stdin (or user reset-password --password-stdin) is stored with a byte order mark in front of it, so the user cannot sign in with the password that was piped:
"YourPassword123!" | dotnet run --no-build --project src/FluentCMS.Host -- fluentcms user create --email [email protected] --role "Super Admin" --password-stdin
The command reports success, and the sign-in page then answers "Sign-in failed" for that address and password. The same command fed from a pipe without a byte order mark (cmd, bash) signs in.
Why
PowerShell can write a UTF-8 byte order mark before what it pipes to a native command. ConsoleCommandInput.ReadLineAsync reads Console.In, which does not drop it, so the first line of standard input is the mark followed by the password.
Expected
A byte order mark at the start of redirected standard input is not part of the first line, and what follows it is read as UTF-8.
- 主要语言
- C#
- 星标
- 567
- 派生
- 107
- 平均合并
- 2 小时 35 分钟
- 30 天内合并 PR
- 425
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fluentcms/FluentCMS 的其他 Issue
-
area:operations type:feature
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
area:events area:jobs area:settings area:storage type:chore
难度 5/5 一周以上 新手友好度 18/100
维护者通常 1 天内回复
-
area:admin type:chore
难度 5/5 一周以上 新手友好度 12/100
维护者通常 1 天内回复
-
area:authorization area:identity type:chore
难度 5/5 一周以上 新手友好度 8/100
维护者通常 1 天内回复
-
area:content type:chore
难度 5/5 一周以上 新手友好度 12/100
维护者通常 1 天内回复
查看 fluentcms/FluentCMS 的全部 Issue
相似的 Issue
-
area-CodeGen-coreclr untriaged
难度 2/5 1-3 小时 新手友好度 65/100
dotnet/runtime#138181 · 1 条评论 ·
维护者通常 1 天内回复
-
needs-area-label
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug 🐞
难度 2/5 1-3 小时 新手友好度 72/100
valkey-io/valkey-glide#7849 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
bitfoundation/bitplatform#15455 ·
维护者通常 1 天内回复
-
area-Asset area-GameStudio area-Samples bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复