From bf986b4d71936ccb5518def8ddd26be44636b61b Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Fri, 16 May 2025 16:35:44 +0200
Subject: [PATCH] fix auth4
---
env_prod.env | 2 +-
modules/gatewayInterface.py | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/env_prod.env b/env_prod.env
index 072fcf75..42a47166 100644
--- a/env_prod.env
+++ b/env_prod.env
@@ -26,7 +26,7 @@ APP_ALLOWED_ORIGINS=http://localhost:8080,https://playground.poweron-center.net,
# Logging configuration
APP_LOGGING_LOG_LEVEL = INFO
-APP_LOGGING_LOG_FILE = /home/poweron.log
+APP_LOGGING_LOG_FILE = /home/site/wwwroot/poweron.log
APP_LOGGING_FORMAT = %(asctime)s - %(levelname)s - %(name)s - %(message)s
APP_LOGGING_DATE_FORMAT = %Y-%m-%d %H:%M:%S
APP_LOGGING_CONSOLE_ENABLED = True
diff --git a/modules/gatewayInterface.py b/modules/gatewayInterface.py
index e499245c..2ab0da0f 100644
--- a/modules/gatewayInterface.py
+++ b/modules/gatewayInterface.py
@@ -279,7 +279,9 @@ class GatewayInterface:
users = self.db.getRecordset("users")
for user in users:
if user.get("username") == username:
- return user
+ # Return a copy of the user with all fields, including hashedPassword
+ return user.copy()
+ logger.debug(f"No user found with username {username}")
return None
def getUser(self, userId: int) -> Optional[Dict[str, Any]]: