Skip to content

Commit b3fa59d

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

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

swift/ql/src/queries/Security/CWE-020/MissingRegexAnchor.qhelp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<p>
88

99
Sanitizing untrusted input with regular expressions is a
10-
common technique. However, it is error-prone to match untrusted input
11-
against regular expressions without anchors such as <code>^</code> or
12-
<code>$</code>. Malicious input can bypass such security checks by
13-
embedding one of the allowed patterns in an unexpected location.
10+
common technique, but malicious actors may be able to embed one of the
11+
allowed patterns in an unexpected location. To prevent against this,
12+
you should use anchors in your regular expressions,
13+
such as <code>^</code> or <code>$</code>.
1414

1515
</p>
1616

@@ -36,9 +36,9 @@
3636

3737
<p>
3838

39-
The following example code checks that a URL redirection
39+
The following example code attempts to check that a URL redirection
4040
will reach the <code>example.com</code> domain, and not
41-
some malicious site.
41+
a malicious site:
4242

4343
</p>
4444

0 commit comments

Comments
 (0)