diff --git a/utils/auth.py b/utils/auth.py index c104b0e..c5e0efd 100644 --- a/utils/auth.py +++ b/utils/auth.py @@ -36,12 +36,12 @@ def login( import time # Validate required parameters - if not username: - raise ValueError("username is required") - if not password: - raise ValueError("password is required") - if not url: - raise ValueError("url is required") + if not username or not username.strip(): + raise ValueError("username is required and cannot be empty or whitespace") + if not password or not password.strip(): + raise ValueError("password is required and cannot be empty or whitespace") + if not url or not url.strip(): + raise ValueError("url is required and cannot be empty or whitespace") # Launch browser browser = playwright.chromium.launch(headless=headless)