Skip to content

Commit 3b9847e

Browse files
apply suggestions from max
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
1 parent 4073dfa commit 3b9847e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

javascript/ql/src/Security/CWE-079/ExceptionXss.qhelp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
<overview>
77
<p>
8-
Directly writing exceptions to a webpage with sanitization allows for a cross-site scripting
9-
vulnerability if the value of the exception can be influenzed by a user.
8+
Directly writing exceptions to a webpage without sanitization allows for a cross-site scripting
9+
vulnerability if the value of the exception can be influenced by a user.
1010
</p>
1111
</overview>
1212

@@ -21,7 +21,7 @@ references.
2121
<example>
2222
<p>
2323
The following example shows an exception being written directly to the document,
24-
and this exception can potentially be influenzed the page URL,
24+
and this exception can potentially be influenced the page URL,
2525
leaving the website vulnerable to cross-site scripting.
2626
</p>
2727
<sample src="examples/ExceptionXss.js" />

javascript/ql/src/semmle/javascript/security/dataflow/ExceptionXss.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module ExceptionXss {
2222
)
2323
}
2424

25-
DataFlow::Node getExceptionalSuccssor(DataFlow::Node pred) {
25+
DataFlow::Node getExceptionalSuccessor(DataFlow::Node pred) {
2626
if exists(getEnclosingTryStmt(pred.asExpr().getEnclosingStmt()))
2727
then
2828
result.(DataFlow::ParameterNode).getParameter() = getEnclosingTryStmt(pred
@@ -76,7 +76,7 @@ module ExceptionXss {
7676
succ = getExceptionalSuccssor(pred) and
7777
(canThrowSensitiveInformation(pred) or pred = any(DataFlow::InvokeNode c).getExceptionalReturn())
7878
or
79-
// All the usual taint-flow steps applies on data-flow before it has been thrown in an exception.
79+
// All the usual taint-flow steps apply on data-flow before it has been thrown in an exception.
8080
this.isAdditionalFlowStep(pred, succ) and inlbl instanceof NotYetThrown and outlbl instanceof NotYetThrown
8181
or
8282
// We taint an object deep if it happens before an exception has been thrown.

0 commit comments

Comments
 (0)