Skip to content

Commit 962c16d

Browse files
geoffw0subatoi
andauthored
Apply suggestions from code review
Co-authored-by: Ben Ahmady <[email protected]>
1 parent a050de7 commit 962c16d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

swift/ql/src/queries/Security/CWE-1333/ReDoS.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<qhelp>
33
<include src="ReDoSIntroduction.inc.qhelp" />
44
<example>
5-
<p>Consider this regular expression:</p>
5+
<p>Consider the following regular expression:</p>
66
<sample language="swift">
77
/^_(__|.)+_$/</sample>
88
<p>
99
Its sub-expression <code>"(__|.)+"</code> can match the string
1010
<code>"__"</code> either by the first alternative <code>"__"</code> to the
1111
left of the <code>"|"</code> operator, or by two repetitions of the second
12-
alternative <code>"."</code> to the right. Thus, a string consisting of an
12+
alternative <code>"."</code> to the right. Therefore, a string consisting of an
1313
odd number of underscores followed by some other character will cause the
1414
regular expression engine to run for an exponential amount of time before
1515
rejecting the input.

swift/ql/src/queries/Security/CWE-1333/ReDoSIntroduction.inc.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<p>
3232
Modify the regular expression to remove the ambiguity, or ensure that the
3333
strings matched with the regular expression are short enough that the
34-
time-complexity does not matter.
34+
time complexity does not matter.
3535
</p>
3636
</recommendation>
3737
</qhelp>

0 commit comments

Comments
 (0)