cf login doesn't work properly when password specified with mutliple special characters.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia dal punto di ingresso del comando cf login e riproduci il comando segnalato con la password di esempio, confrontandolo con l’accesso interattivo. Verifica come viene analizzato l’argomento -p quando inizia con un trattino o contiene caratteri speciali; il lavoro è terminato quando l’accesso non interattivo accetta i casi di password documentati senza l’errore di flag mostrato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Please fill out the issue checklist below and provide ALL the requested information.
- [ x] I reviewed open and closed github issues that may be related to my problem.
- [ x] I tried updating to the latest version of the CF CLI to see if it fixed my problem.
- I attempted to run the command with
CF_TRACE=1to help debug the issue. - I am reporting a bug that others will be able to reproduce.
Describe the bug and the command you saw an issue with
Command CF login
I have an application that calls cf cli internally.
I run cf login -u username -p password
When the password has special characters , cf login fails.
For eg.,
for demo purpose let's say imaginary password "-ig@ZlHDVZl_"
cf login -o myOrg -s mySpace -u devUser1 -p "-ig@ZlHDVZl_"
What happened
It throws following error
Incorrect Usage: expected argument for flag `-p', but got option `-ig@ZlHDVZl_'
NAME:
login - Log user in
This error seems to differ for different passwords. Escaping the characters didn't work as well.
But the same password works via interactive cf login.
Expected behavior
cf login should work via -u and -p options when password has special characters
Exact Steps To Reproduce
Steps to reproduce the behavior; include the exact CLI commands and verbose output:
- Run
cf login -u username -p passwordwith plenty of special characters in password especially "?" and "$_" - See error
- Run interactive cf login and enter username and password on prompt, don't see error.
Provide more context
- platform and shell details ( e.g. Mac OS 14.2 Built in terminal)
- version of the CLI you are running : 8.9.0+c23186c.2024-12-02
- version of the CC API Release you are on 3.186.0
What could be the reason for this behaviour? Do you have any recommendations on special characters in passwords when used directly in shell command?
- Lingua principale
- Go
- Stelle
- 1.9k
- Fork
- 990
- Merge medio
- 1g 7h
- PR unite (30g)
- 8
Guida per i contributori
Apri 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 cloudfoundry/cli
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
cloudfoundry/cli#3866 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
cloudfoundry/cli#3863 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
cloudfoundry/cli#3851 · 1 commento · 1 reazione ·
-
Add zsh shell completion Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
cloudfoundry/cli#3794 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
cloudfoundry/cli#3787 · 1 commento ·
Tutte le issue di cloudfoundry/cli
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
JakeChampion/lang#10213 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100