Deprecate previous version

This commit is contained in:
Alvaro Muñoz
2022-10-11 12:46:01 +02:00
parent 15f641893e
commit 2ab34c85b2

View File

@@ -41,6 +41,14 @@ module ReflectedXss {
)
}
/**
* DEPRECATED: Holds if `h` may send a response with a content type other than HTML.
*/
deprecated Http::HeaderDefinition nonHtmlContentTypeHeader(Http::RouteHandler h) {
result = h.getAResponseHeader("content-type") and
not exists(string tp | result.defines("content-type", tp) | tp.regexpMatch("(?i).*html.*"))
}
/**
* Gets a HeaderDefinition that defines a XSS safe content-type for `send`.
*/
@@ -67,14 +75,6 @@ module ReflectedXss {
]
}
/**
* DEPRECATED: Holds if `h` may send a response with a content type other than HTML.
*/
deprecated Http::HeaderDefinition nonHtmlContentTypeHeader(Http::RouteHandler h) {
result = h.getAResponseHeader("content-type") and
not exists(string tp | result.defines("content-type", tp) | tp.regexpMatch("(?i).*html.*"))
}
/**
* Holds if `h` may send a response with a content type that is safe for XSS.
*/