From b016b45b0f157e127079ebf2f55c9588165c5751 Mon Sep 17 00:00:00 2001 From: Julien Aldon Date: Thu, 29 Jan 2026 16:07:16 +0100 Subject: [PATCH] fix bcryp version --- .gitea/workflows/deploy.yaml | 2 +- back/main.py | 4 ++-- back/requirements.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 0de14a2..8260afc 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -14,7 +14,7 @@ jobs: - name: Test backend uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.10" - run: | python -m pip install --upgrade pip pip install -r back/requirements.txt diff --git a/back/main.py b/back/main.py index 79e1b8c..7715f67 100644 --- a/back/main.py +++ b/back/main.py @@ -55,7 +55,7 @@ def verify_password(plain_password, hashed_password): def get_password_hash(password): return pwd_context.hash(password) -def authenticate_user(name, password): +def authenticate_user(db, name, password): user = get_user(db, name) if len(user) == 0: return False @@ -97,7 +97,7 @@ async def login_for_access_token( form_data: OAuth2PasswordRequestForm = Depends(), db=Depends(get_db) ): - user = authenticate_user(form_data.username, form_data.password) + user = authenticate_user(db, form_data.username, form_data.password) username = form_data.username if not user: raise HTTPException( diff --git a/back/requirements.txt b/back/requirements.txt index da6cee9..4cf493b 100644 --- a/back/requirements.txt +++ b/back/requirements.txt @@ -1,7 +1,7 @@ annotated-doc==0.0.4 annotated-types==0.7.0 anyio==4.12.1 -bcrypt==5.0.0 +bcrypt<4.0.0 certifi==2026.1.4 click==8.1.8 dnspython==2.7.0