Skip to content

Commit 96a720c

Browse files
authored
Merge pull request github#13285 from erik-krogh/redoshelp
ReDoS: fix whitespace in the samples in ReDoS.qhelp
2 parents c28af76 + 9f5bf8f commit 96a720c

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

java/ql/src/Security/CWE/CWE-730/ReDoS.qhelp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
Consider this regular expression:
1212
</p>
1313
<sample language="java">
14-
^_(__|.)+_$
15-
</sample>
14+
^_(__|.)+_$</sample>
1615
<p>
1716
Its sub-expression <code>"(__|.)+?"</code> can match the string <code>"__"</code> either by the
1817
first alternative <code>"__"</code> to the left of the <code>"|"</code> operator, or by two
@@ -25,8 +24,7 @@
2524
the two branches of the alternative inside the repetition:
2625
</p>
2726
<sample language="java">
28-
^_(__|[^_])+_$
29-
</sample>
27+
^_(__|[^_])+_$</sample>
3028
</example>
3129

3230
<include src="ReDoSReferences.inc.qhelp"/>

javascript/ql/src/Performance/ReDoS.qhelp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
Consider this regular expression:
1212
</p>
1313
<sample language="javascript">
14-
/^_(__|.)+_$/
15-
</sample>
14+
/^_(__|.)+_$/</sample>
1615
<p>
1716
Its sub-expression <code>"(__|.)+?"</code> can match the string <code>"__"</code> either by the
1817
first alternative <code>"__"</code> to the left of the <code>"|"</code> operator, or by two
@@ -25,8 +24,7 @@
2524
the two branches of the alternative inside the repetition:
2625
</p>
2726
<sample language="javascript">
28-
/^_(__|[^_])+_$/
29-
</sample>
27+
/^_(__|[^_])+_$/</sample>
3028
</example>
3129

3230
<include src="ReDoSReferences.inc.qhelp"/>

python/ql/src/Security/CWE-730/ReDoS.qhelp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
Consider this regular expression:
1212
</p>
1313
<sample language="python">
14-
^_(__|.)+_$
15-
</sample>
14+
^_(__|.)+_$</sample>
1615
<p>
1716
Its sub-expression <code>"(__|.)+?"</code> can match the string <code>"__"</code> either by the
1817
first alternative <code>"__"</code> to the left of the <code>"|"</code> operator, or by two
@@ -25,8 +24,7 @@
2524
the two branches of the alternative inside the repetition:
2625
</p>
2726
<sample language="python">
28-
^_(__|[^_])+_$
29-
</sample>
27+
^_(__|[^_])+_$</sample>
3028
</example>
3129

3230
<include src="ReDoSReferences.inc.qhelp"/>

ruby/ql/src/queries/security/cwe-1333/ReDoS.qhelp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<example>
55
<p>Consider this regular expression:</p>
66
<sample language="ruby">
7-
/^_(__|.)+_$/
8-
</sample>
7+
/^_(__|.)+_$/</sample>
98
<p>
109
Its sub-expression <code>"(__|.)+?"</code> can match the string
1110
<code>"__"</code> either by the first alternative <code>"__"</code> to the
@@ -21,8 +20,7 @@
2120
repetition:
2221
</p>
2322
<sample language="ruby">
24-
/^_(__|[^_])+_$/
25-
</sample>
23+
/^_(__|[^_])+_$/</sample>
2624
</example>
2725
<include src="ReDoSReferences.inc.qhelp"/>
2826
</qhelp>

0 commit comments

Comments
 (0)