Skip to content

🔒 Fix Weak Password Hashing (SHA-1) -> SHA-256#90

Open
G30RG3-GJ wants to merge 1 commit intomasterfrom
security-fix-password-hashing-15941768037807264900
Open

🔒 Fix Weak Password Hashing (SHA-1) -> SHA-256#90
G30RG3-GJ wants to merge 1 commit intomasterfrom
security-fix-password-hashing-15941768037807264900

Conversation

@G30RG3-GJ
Copy link
Owner

This PR addresses the security vulnerability of using weak SHA-1 hashing for passwords.
It upgrades the hashing algorithm to SHA-256 and implements a seamless migration strategy for existing users.
When a user logs in with a legacy SHA-1 password, the system detects it, validates the login, and then automatically upgrades the stored password to SHA-256.
File saving logic in Preferences was refactored to allow silent saving during migration without triggering UI alerts.


PR created automatically by Jules for task 15941768037807264900 started by @G30RG3-GJ

- Updated `Preferences.java` to use SHA-256 for all new passwords.
- Refactored `Preferences.java` to separate file saving logic from UI alerts.
- Updated `LoginController.java` to support both SHA-256 and legacy SHA-1 hashes.
- Implemented automatic migration from SHA-1 to SHA-256 upon successful login.
- Added stub for `AlertMaker` to enable headless testing of `Preferences` logic.

Co-authored-by: G30RG3-GJ <203693057+G30RG3-GJ@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant