Spaces:
Running
Running
Update authentication credentials in .env.example and modify password verification in auth.py to enhance security. The default password has been changed to 'volaris123' for improved security practices.
Browse files- .env.example +2 -2
- api/routers/auth.py +1 -1
.env.example
CHANGED
|
@@ -9,5 +9,5 @@ LANGCHAIN_PROJECT=
|
|
| 9 |
LANGSMITH_URL=
|
| 10 |
|
| 11 |
# Authentication credentials
|
| 12 |
-
AUTH_USERNAME=
|
| 13 |
-
AUTH_PASSWORD=
|
|
|
|
| 9 |
LANGSMITH_URL=
|
| 10 |
|
| 11 |
# Authentication credentials
|
| 12 |
+
AUTH_USERNAME=
|
| 13 |
+
AUTH_PASSWORD=
|
api/routers/auth.py
CHANGED
|
@@ -84,7 +84,7 @@ def verify_session(token: Optional[str]) -> Optional[dict]:
|
|
| 84 |
def verify_credentials(username: str, password: str) -> bool:
|
| 85 |
"""Verify username and password against environment variables"""
|
| 86 |
expected_username = os.getenv("AUTH_USERNAME", "volaris")
|
| 87 |
-
expected_password = os.getenv("AUTH_PASSWORD", "
|
| 88 |
|
| 89 |
return username == expected_username and password == expected_password
|
| 90 |
|
|
|
|
| 84 |
def verify_credentials(username: str, password: str) -> bool:
|
| 85 |
"""Verify username and password against environment variables"""
|
| 86 |
expected_username = os.getenv("AUTH_USERNAME", "volaris")
|
| 87 |
+
expected_password = os.getenv("AUTH_PASSWORD", "volaris123")
|
| 88 |
|
| 89 |
return username == expected_username and password == expected_password
|
| 90 |
|