fixing browserstack regex username detection

This commit is contained in:
raju-bs
2023-02-20 20:27:40 +05:30
parent 4be186581a
commit 69c4bdd427
+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.