Skip to content

Conversation

@sunnydanu
Copy link
Owner

@sunnydanu sunnydanu commented Oct 26, 2024

Started out with fixing CorentinTh/it-tools#1133, but I also found out it was super easy to crash the browser tab by setting the salt count to a high enough value. In light of that:

  • Switched from sync to async versions of the bcrypt functions.
  • Reduced max rounds to 20, as 100 is absurdly high (even 20 is absurdly high with current computing power).
  • I also added a timeout if hashing/comparing takes >10 seconds. That timeout kicks in somewhere between 16 and 17 rounds on my machine.
  • Updated visual progress/error states in the UI, including a progress bar and a message showing how long the function took to run.
  • In-progress functions are aborted if the user changes the inputs before they run to completion.

bcrypt


Note: This PR incorporates contributions from upstream PR-#1152 of CorentinTh/it-tools. All original commits and authorship are retained. Some adjustments may have been made for compatibility or bug fixes.

@sunnydanu sunnydanu added the P2 Priority 2 : tech debt label Nov 2, 2024
@sunnydanu sunnydanu enabled auto-merge November 2, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Priority 2 : tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants