mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
JS: Update IncompleteHostnameRegExp test to match reality
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
problems
|
||||
| tst-IncompleteHostnameRegExp.js:3:3:3:28 | ^http:\\/\\/test.example.com | This regular expression has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:3:2:3:29 | /^http: ... le.com/ | here |
|
||||
| tst-IncompleteHostnameRegExp.js:5:3:5:28 | ^http:\\/\\/test.example.net | This regular expression has an unescaped '.' before 'example.net', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:5:2:5:29 | /^http: ... le.net/ | here |
|
||||
| tst-IncompleteHostnameRegExp.js:6:3:6:42 | ^http:\\/\\/test.(example-a\|example-b).com | This regular expression has an unescaped '.' before '(example-a\|example-b).com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:6:2:6:43 | /^http: ... b).com/ | here |
|
||||
@@ -27,10 +26,3 @@ problems
|
||||
| tst-IncompleteHostnameRegExp.js:55:14:55:38 | ^http://test.example.com | This regular expression has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:55:13:55:39 | '^http: ... le.com' | here |
|
||||
| tst-IncompleteHostnameRegExp.js:59:5:59:20 | foo.example\\.com | This regular expression has an unescaped '.' before 'example\\.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:59:2:59:32 | /^(foo. ... ever)$/ | here |
|
||||
| tst-IncompleteHostnameRegExp.js:61:18:61:41 | ^http://test.example.com | This regular expression has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:61:17:61:42 | "^http: ... le.com" | here |
|
||||
testFailures
|
||||
| tst-IncompleteHostnameRegExp.js:9:45:9:54 | // $ Alert | Missing result: Alert |
|
||||
| tst-IncompleteHostnameRegExp.js:10:3:10:36 | This regular expression has an unescaped '.' before 'example.com', so it might match more hosts than expected. | Unexpected result: Alert |
|
||||
| tst-IncompleteHostnameRegExp.js:17:35:17:44 | // $ Alert | Missing result: Alert |
|
||||
| tst-IncompleteHostnameRegExp.js:36:43:36:52 | // $ Alert | Missing result: Alert |
|
||||
| tst-IncompleteHostnameRegExp.js:42:69:42:78 | // $ Alert | Missing result: Alert |
|
||||
| tst-IncompleteHostnameRegExp.js:59:5:59:20 | This regular expression has an unescaped '.' before 'example\\.com', so it might match more hosts than expected. | Unexpected result: Alert |
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
/^http:\/\/test.(example-a|example-b).com/; // $ Alert
|
||||
/^http:\/\/(.+).example.com\//; // $ Alert
|
||||
/^http:\/\/(\\.+)\\.example.com/;
|
||||
/^http:\/\/(?:.+)\\.test\\.example.com\//; // $ Alert
|
||||
/^http:\/\/test.example.com\/(?:.*)/;
|
||||
/^http:\/\/(?:.+)\\.test\\.example.com\//; // $ MISSING: Alert (TODO)
|
||||
/^http:\/\/test.example.com\/(?:.*)/; // $ SPURIOUS: Alert (TODO)
|
||||
new RegExp("^http://test.example.com"); // $ Alert
|
||||
if (s.match("^http://test.example.com")) {} // $ Alert
|
||||
|
||||
function id(e) { return e; }
|
||||
new RegExp(id(id(id("^http://test.example.com")))); // $ Alert
|
||||
|
||||
new RegExp(`test.example.com$`); // $ Alert
|
||||
new RegExp(`test.example.com$`); // $ MISSING: Alert (TODO)
|
||||
|
||||
let hostname = '^test.example.com'; // $ Alert
|
||||
new RegExp(`${hostname}$`);
|
||||
@@ -33,13 +33,13 @@
|
||||
}
|
||||
domains.map(d => convert2(d));
|
||||
|
||||
/^(.+\.(?:example-a|example-b)\.com)\//; // $ Alert
|
||||
/^(.+\.(?:example-a|example-b)\.com)\//; // $ MISSING: Alert (TODO)
|
||||
/^(https?:)?\/\/((service|www).)?example.com(?=$|\/)/; // $ Alert
|
||||
/^(http|https):\/\/www.example.com\/p\/f\//; // $ Alert
|
||||
/^(http:\/\/sub.example.com\/)/g; // $ Alert
|
||||
/^https?:\/\/api.example.com/; // $ Alert
|
||||
new RegExp('^http://localhost:8000|' + '^https?://.+\\.example\\.com/'); // $ Alert
|
||||
new RegExp('^http[s]?:\/\/?sub1\\.sub2\\.example\\.com\/f\/(.+)'); // $ Alert
|
||||
new RegExp('^http[s]?:\/\/?sub1\\.sub2\\.example\\.com\/f\/(.+)'); // $ MISSING: Alert (TODO)
|
||||
/^https:\/\/[a-z]*.example.com$/; // $ Alert
|
||||
RegExp('^protos?://(localhost|.+.example.net|.+.example-a.com|.+.example-b.com|.+.example.internal)'); // $ Alert
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/^http:\/\/(..|...)\.example\.com\/index\.html/; // OK, wildcards are intentional
|
||||
/^http:\/\/.\.example\.com\/index\.html/; // OK, the wildcard is intentional
|
||||
/^(foo.example\.com|whatever)$/; // kinda OK - one disjunction doesn't even look like a hostname
|
||||
/^(foo.example\.com|whatever)$/; // $ SPURIOUS: Alert (TODO) (kinda OK - one disjunction doesn't even look like a hostname)
|
||||
|
||||
if (s.matchAll("^http://test.example.com")) {} // $ Alert
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user