fixing browserstack regex username detection

This commit is contained in:
raju-bs
2023-02-20 20:54:14 +05:30
parent 69c4bdd427
commit a2e2174a12
+1 -1
View File
@@ -21,7 +21,7 @@ var (
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack", "key", "automate", "local"}) + `\b([0-9a-zA-Z]{20})\b`)
userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack", "user", "automate", "local"}) + `\b([a-zA-Z\d]+[._-]?){3,18}([a-zA-Z\d]+){6}\b`)
userPat = regexp.MustCompile(detectors.PrefixRegex([]string{"browserstack", "user", "automate", "local"}) + `\b([a-zA-Z\d]{3,18})[._-]?([a-zA-Z\d]){6}\b`)
)
// Keywords are used for efficiently pre-filtering chunks.