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

fix(bcrypt-tool):-fix-bcrypt-error-states-and-crashes-(#1133) #120

Open
wants to merge 4 commits into
base: developing/2.0.0
Choose a base branch
from

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.

2 participants