Git.commit: --author value is wrapped in literal double quotes, corrupting author names that contain a quote character
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- git, typescript
- 領域
- tooling
調査の方向性
Git.commit の実装で --author 引数が組み立てられている箇所から始め、既存の commit 関連テストを確認します。二重引用符を含む committer 名で問題を再現し、引数を囲むリテラルの引用符を削除し、git log -1 --format='%an' が完全な名前を保持することを確認する回帰テストを追加します。
索引モデルが issue の本文から書いたものです。
説明
Observed behavior
Git.commit builds the --author argument with literal double quotes:
args.push(`--author="${committer.name} <${committer.email}>"`);
Because child_process.spawn is used without a shell, the literal " characters are part of the value passed to git. Git's "crud stripping" of identity strings hides the problem for ordinary names (leading/trailing quotes get filtered out), but the protection breaks down if committer.name itself contains a ".
Expected behavior
The literal quotes should not be in the value. The standard format that git documents is just --author=Name <email>, with no surrounding quotes.
Minimal reproduction
await git.commit('msg', {
committer: { name: 'Joe \"Real\"', email: '[email protected]' },
});
// git log -1 --format='%an'
// -> Joe \"Real (the trailing quote is silently lost)
Verified with a standalone Node script that replicates Git.commit's exact spawn arguments. Observed result:
AN=[Joe \"Real] AE=[[email protected]] CN=[Joe \"Real] CE=[[email protected]]
The trailing \" from the source name is gone.
Suggested fix
args.push(`--author=${committer.name} <${committer.email}>`);
A regression test that commits with committer.name = 'Joe \"Real\"' and asserts git log -1 --format='%an' returns Joe \"Real\" would catch this.
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
joewalker/loop-the-loop のほかの issue
-
bug S4
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
joewalker/loop-the-loop#88 ·
-
Git exec(): child killed by a signal rejects with new Error('') and loses the signal informationオープンbug S3
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
joewalker/loop-the-loop#84 ·
-
bug S3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
joewalker/loop-the-loop#82 ·
-
bug S4
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
joewalker/loop-the-loop#79 ·
-
bug S4
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
joewalker/loop-the-loop#78 ·
joewalker/loop-the-loop の issue をすべて見る
似ている issue
-
Sequências em espanhol: «Atualizado em», a aba «Fila» e o valor 'pause' ainda saem em portuguêsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
melgarafael/DeskcommCRM#3104 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug service: webapp
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Ocelot-Social-Community/Ocelot-Social#10684 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nicobailon/pi-subagents#2978 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
getsentry/sentry-conventions#732 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信