-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn against Falsy credentials #8683
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/1c662c46cbc57c150e1ea262b24f537d7b473212/gradio-4.37.2-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@1c662c46cbc57c150e1ea262b24f537d7b473212#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-builds.s3.amazonaws.com/1c662c46cbc57c150e1ea262b24f537d7b473212/gradio-client-1.2.1.tgz |
Thanks @Paillat-dev I would suggest raising a warning when a none or empty credential is passed in instead of an error -- a lot of times, users are simply prototyping quickly with auth and we don't want to break those workflows |
Allowing Falsy auth credentials will cause problems later, for example in `hmac.compare_digest(input_password.encode(), correct_password.encode())` as NoneType has no `encode` method. Moreover, allowing empty passwords would make no sense from a security point of view.
Sure, I changed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @Paillat-dev thanks for the contribution!
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
Allowing Falsy auth credentials will cause problems later, for example in
hmac.compare_digest(input_password.encode(), correct_password.encode())
as NoneType has noencode
method. Moreover, allowing empty passwords would make no sense from a security point of view.Let me know if any changes are required.