Skip to content

Smuger/HireRightPassword-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[New Account] Passwords containing %

HireRight uses weird regex for checking password length isValidLength()

Regex:


/^[^%\s]{8,}/

Demo website:


https://smuger.github.io/HireRightPassword-Problem/


issue

Which means that

Accept Deny
12345678 %2345678
qwertyui 123%5678

Code

function isValidLength(input) {
	var reg = /^[^%\s]{8,}/;
    return reg.test(input);
}

Solution

Change regex to /^[^\s]{8,}/ or Add a note that you cannot use %

About

HireRight has a weird regex setup for passwords that excludes any string with % in it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published