Browse Source

Adds --end-of-options for input security

main
Eric Amodio 2 years ago
parent
commit
c463c3367e
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/env/node/git/git.ts

+ 2
- 0
src/env/node/git/git.ts View File

@ -1175,6 +1175,7 @@ export namespace Git {
'rev-parse', 'rev-parse',
'--abbrev-ref', '--abbrev-ref',
'--symbolic-full-name', '--symbolic-full-name',
'--end-of-options',
'@', '@',
'@{u}', '@{u}',
'--', '--',
@ -1284,6 +1285,7 @@ export namespace Git {
{ cwd: repoPath, errors: GitErrorHandling.Ignore }, { cwd: repoPath, errors: GitErrorHandling.Ignore },
'rev-parse', 'rev-parse',
'--verify', '--verify',
'--end-of-options',
fileName ? `${ref}:./${fileName}` : `${ref}^{commit}`, fileName ? `${ref}:./${fileName}` : `${ref}^{commit}`,
); );
return data.length === 0 ? undefined : data.trim(); return data.length === 0 ? undefined : data.trim();

Loading…
Cancel
Save