.pgpass file support handles backslash escapes incorrectly; should de-escape values
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Inizia risolvendo il problema di configurazione dei test Python 3.12 segnalato per python setup.py test o pip install -e .[test], quindi individua la gestione di .pgpass di asyncpg. Aggiungi la copertura per i due punti e le barre rovesciate con escape, e considera concluso il problema quando questi valori vengono privati dell'escape in modo coerente con psql.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
https://www.postgresql.org/docs/current/libpq-pgpass.html isn't fully explicit about how to handle backslash escapes in the .pgpass file, however it's reasonably clear from the phrasing that backslashes serve only to escape backslashes and colons and therefore aren't considered part of the value they're used in. E.g., a .pgpass row of …
*:*:test\:db:test\\:password from pgpass with escapes
conveys:
- a database name of
test:db, nottest\:db - a user name of
test\, nottest\\
I ran into this problem because I have a password of 4:K1…, encoded as 4\:K1…, and it works with psql but not asyncpg. Once I remove the backslash from .pgpass, it starts working with asyncpg but failing with psql.
I would've provided a failing test and even a code change, but I can't get python setup.py test or pip install -e .[test] to work in a run-of-the-mill Python 3.12 virtualenv on my run-of-the-mill MacOS.
- Lingua principale
- Python
- Stelle
- 8.1k
- Fork
- 469
- Merge medio
- 4h 42m
- PR unite (30g)
- 6
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 MagicStack/asyncpg
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MagicStack/asyncpg#1357 ·
-
tests fail in 2032 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
MagicStack/asyncpg#997 ·
-
Connection.close(timeout=) waits forever on a pending cancel when the server never acknowledges it Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
MagicStack/asyncpg#1356 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
MagicStack/asyncpg#1354 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
MagicStack/asyncpg#1342 ·
Tutte le issue di MagicStack/asyncpg
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
use-agent-os/agent-os#3314 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
BasedHardware/omi#15662 · 1 commento ·
-
documentation help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
AiursoftWeb/AnduinOS-2#19 ·