Skip to content

Conversation

@christopherholland-workday
Copy link
Contributor

Overview

Today, the application defaults to 5 salt rounds, increasing to 10 which is suggested by OWASP.

Additionally, adding a check to the login method to see if the existing has uses 10 rounds or not using the bcrypt.getRounds() method, and updating the hash if it is less than 10 rounds.

Testing Details

  1. Booted up Flowise locally and signed up (using 5 salt rounds)
  2. Made code updates to use 10 rounds, but made a temporary change to the code to throw an exception after the check (if (hashNeedsUpgrade(user.credential!, minRounds))) confirming that the check worked and determined there were insufficient salt rounds
  3. Removes the exception from the code, login succeeded and so did subsequent logins

Today, the application defaults to 5 salt rounds, increasing to 10 which is suggested by OWASP.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a great security improvement. It increases the bcrypt salt rounds to the recommended value of 10 and implements a seamless upgrade path for existing users' passwords upon login. The changes are well-structured, introducing utility functions for checking and upgrading hashes. I have a few suggestions to reduce code duplication and improve maintainability, primarily around centralizing the logic for determining salt rounds and using the new getHash utility consistently.

@christopherholland-workday christopherholland-workday merged commit c045ceb into main Jan 28, 2026
6 checks passed
@yau-wd yau-wd deleted the feature/salt-round-increase branch January 29, 2026 06:37
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.

4 participants