Skip to content
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

native_python: Use a password hash instead of a clear text password #255

Open
fusion44 opened this issue May 9, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working security v0.6.0-beta
Milestone

Comments

@fusion44
Copy link
Owner

fusion44 commented May 9, 2024

Right now the api reads the clear text password from the environment. Change thid to use a precomputed hashed password instead.

matches = secrets.compare_digest(i.password, config("login_password", cast=str))

@fusion44 fusion44 added bug Something isn't working security labels May 9, 2024
@fusion44 fusion44 added this to the V0.6.0-beta milestone May 9, 2024
@fusion44 fusion44 self-assigned this May 9, 2024
thejamesgore added a commit to thejamesgore/blitz_api that referenced this issue Jun 21, 2024
- Replaced clear text password comparison with hashed password comparison using bcrypt.
- Updated environment variable to store the hashed password instead of the clear text password.
- Enhanced security by avoiding the storage and comparison of plain text passwords.

Fixes issue fusion44#255.
@thejamesgore
Copy link

Thought I would give this a crack as was implemented something similar using bcrypt in one of my projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working security v0.6.0-beta
Projects
None yet
Development

No branches or pull requests

2 participants