File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,9 @@ module HTTP {
412412 *
413413 * In these cases, the request is technically sent from the user's browser, but
414414 * the user is not in direct control of the URL or POST body.
415+ *
416+ * Headers are never considered third-party controllable by this predicate, although the
417+ * third party does have some control over the the Referer and Origin headers.
415418 */
416419 predicate isThirdPartyControllable ( ) {
417420 exists ( string kind | kind = getKind ( ) |
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ module ReflectedXss {
4747 class ThirdPartyRequestInputAccessAsSource extends Source {
4848 ThirdPartyRequestInputAccessAsSource ( ) {
4949 this .( HTTP:: RequestInputAccess ) .isThirdPartyControllable ( )
50+ or
51+ this .( HTTP:: RequestHeaderAccess ) .getAHeaderName ( ) = "referer"
5052 }
5153 }
5254
You can’t perform that action at this time.
0 commit comments