Skip to content

fix: handle invalid character error in Generate HOTP (issue #2445)#2451

Closed
vanhci wants to merge 1 commit into
gchq:masterfrom
vanhci:fix/issue-2445-hotp-invalid-chars
Closed

fix: handle invalid character error in Generate HOTP (issue #2445)#2451
vanhci wants to merge 1 commit into
gchq:masterfrom
vanhci:fix/issue-2445-hotp-invalid-chars

Conversation

@vanhci
Copy link
Copy Markdown

@vanhci vanhci commented May 25, 2026

Summary\n\nWhen Generate HOTP receives invalid characters in the input, it throws a raw TypeError instead of showing a user-friendly error message.\n\n## Fix\n\nWrapped the operation logic in a try-catch block to catch TypeError and display a clear message: "Invalid character found: X".\n\n## Testing\n\n- [ ] Test with invalid characters (|,;,\ etc.) shows clear error message\n- [ ] Test with valid input still works correctly

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


vanhci seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@vanhci vanhci closed this by deleting the head repository May 25, 2026
@HackingRepo
Copy link
Copy Markdown

HackingRepo commented May 25, 2026

also @vanhci, the summary must be clear and readable

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.

3 participants