-
Notifications
You must be signed in to change notification settings - Fork 448
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
[A8][Amarelo Designs] Fix the Insecure Deserialization vulnerability changing Pickle to JWT #422
Conversation
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.
Hey, @secampos! Your implementation of JWT instead of Pickle-based tokens looks very good! 🐼 🚀
I just left a suggestion regarding a hardcoded admin password in the source code
"username":username, | ||
"admin":True, | ||
"sessionId":token, | ||
"exp": datetime.datetime.utcnow() + datetime.timedelta(seconds=600) |
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.
Very good!
@@ -19,11 +22,20 @@ def login(): | |||
|
|||
if username == "admin" and password == "admin": |
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.
What do you think about chaning this default password here? Using an environment variable as you did with JWT_SECRET_KEY
would be great
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.
Thanks, @gustavocovas. Now the application is getting the user's credentials from the environment variables.
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.
Awesome, @secampos!
This solution refers to which of the apps?
A8 - Amarelo Designs
What did you do to mitigate the vulnerability?
The vulnerability was fixed changing the Pickle to JWT.