Skip to content

Commit 0372ccc

Browse files
erik-kroghesbena
andauthored
simplify regexp
Co-authored-by: Esben Sparre Andreasen <[email protected]>
1 parent af64b31 commit 0372ccc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/lib/semmle/javascript/frameworks/CookieLibraries.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private predicate canHaveSensitiveCookie(DataFlow::Node node) {
8080
*/
8181
bindingset[s]
8282
private string getCookieName(string s) {
83-
result = s.regexpCapture("\\s*\\b([^=\\s]*)\\b\\s*=.*", 1)
83+
result = s.regexpCapture("([^=]*)=.*", 1).trim()
8484
}
8585

8686
/**

0 commit comments

Comments
 (0)