TestRunCommandHelper_RejectsPathEscapingRoot/absolute_path fails on Windows
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 67/100
Direzione di ricerca
Leggi internal/tools/tools_test.go in corrispondenza di TestRunCommandHelper_RejectsPathEscapingRoot e segui come run_command convalida l'argomento path con filepath.IsAbs di Go. Decidi come gestire i percorsi Windows con radice, quindi esegui quel test su Windows e su un'altra piattaforma. Il lavoro è completato quando il test ha aspettative coerenti e intenzionali su tutte le piattaforme e passa.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
TestRunCommandHelper_RejectsPathEscapingRoot/absolute_path fails on Windows.
What happens
The test passes "/etc" as the path argument to run_command and expects an error result before any confirm prompt. On Windows, /etc is not an absolute path to filepath.IsAbs, so the path is not rejected there. The command reaches the interactive y/n confirm instead, and the test gets a different result.
The other three cases in the same test (../outside, a/../../etc, sub/../../secrets) pass on Windows.
Where this showed up
- Seen on Windows in #21 and #23 (each PR's test run). Both PR authors noted that the same failure happens on the base branch (
1bff3dfin #23). - The test is in
internal/tools/tools_test.goatTestRunCommandHelper_RejectsPathEscapingRoot.
Suggested direction
Decide what "absolute" means for path arguments on Windows. Either treat a leading / or \ as rooted when checking path (so /etc is rejected on every platform), or change the test to use a Windows-absolute path such as C:\Windows on Windows only. The first keeps one expectation across platforms.
I have not run this on the current main (335144d); the report above is from the PR runs.
- Lingua principale
- Go
- Stelle
- 1
- Fork
- 2
- Merge medio
- 18h 26m
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Edwin-metcalf/MetCode
-
documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
Edwin-metcalf/MetCode#26 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation enhancement help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Edwin-metcalf/MetCode#19 ·
I maintainer di solito rispondono entro 1 giorno
-
testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Edwin-metcalf/MetCode#9 ·
I maintainer di solito rispondono entro 1 giorno
-
Add a MakefileApertaenhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Edwin-metcalf/MetCode#8 ·
I maintainer di solito rispondono entro 1 giorno
-
Add a --host flagApertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Edwin-metcalf/MetCode#7 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Edwin-metcalf/MetCode
Issue simili
-
[Bug]: Deleting an MCP proxy leaves its API keys in the gateway's memory and in the policy engineApertaAspect/API Aspect/Other Severity/Minor Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
wso2/api-platform#3852 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Rafaeldelinares/gentle-mesh#125 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Gentleman-Programming/gentle-ai#5643 ·
I maintainer di solito rispondono entro 1 giorno
-
security
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
FootprintAI/Containarium#2869 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
kubevirt/kubevirt#19559 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno