mirror of
https://github.com/github/codeql.git
synced 2026-03-06 23:56:48 +01:00
JS: Move ExceptionXss source into Xss.qll
This commit is contained in:
@@ -15,18 +15,8 @@ import javascript
|
||||
import semmle.javascript.security.dataflow.ExceptionXss::ExceptionXss
|
||||
import DataFlow::PathGraph
|
||||
|
||||
/**
|
||||
* Gets a description of the source.
|
||||
*/
|
||||
string getSourceDescription(DataFlow::Node source) {
|
||||
result = source.(ErrorSource).getDescription()
|
||||
or
|
||||
not source instanceof ErrorSource and
|
||||
result = "Exception text"
|
||||
}
|
||||
|
||||
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
|
||||
where cfg.hasFlowPath(source, sink)
|
||||
select sink.getNode(), source, sink,
|
||||
"$@ is reinterpreted as HTML without escaping meta-characters.", source.getNode(),
|
||||
getSourceDescription(source.getNode())
|
||||
source.getNode().(Source).getDescription()
|
||||
|
||||
Reference in New Issue
Block a user