Configure `dotenv_values`'s search space
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Review the dotenv_values entry point and the path-handling behavior shown in the example. Done should establish a clear way to control relative-path searching and prevent unintended files such as /etc/passwd from being parsed or exposed; no test file is named in the issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Currently the user-specified path could point to any folder and dotenv will parse them anyway even if it is files like /etc/passwd.
The content of the target file would be available in the error message. This could potentially introduce the path traversal vulnerability if the developer misuses it.
from dotenv import load_dotenv
from dotenv import dotenv_values
import os
config = dotenv_values("../../../etc/passwd")
I am wondering if it is possible to give dotenv_values an additional arguments to control if it would support relative path searching.
- Lingua principale
- Python
- Stelle
- 8.9k
- Fork
- 581
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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 theskumar/python-dotenv
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
theskumar/python-dotenv#699 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
theskumar/python-dotenv#697 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
theskumar/python-dotenv#693 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
theskumar/python-dotenv#683 · 4 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
theskumar/python-dotenv#644 · 2 commenti ·
Tutte le issue di theskumar/python-dotenv
Issue simili
-
link-check link-check:sphinx-theme
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CSCfi/sd-search-api#39 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100