File: fix-sanitation-tests.patch

package info (click to toggle)
redmine 6.0.6%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,100 kB
  • sloc: ruby: 116,319; javascript: 12,885; sh: 460; perl: 303; python: 166; makefile: 30
file content (30 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: Fix the sanitation tests to be compatible with ruby-sanitize 7.0.0.
 Upstream is still using 6.0.0.
Author: Soren Stoutner <soren@debian.org>
Forwarded: not-needed
Last-Update: 2025-08-15

--- a/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb
@@ -191,8 +191,8 @@ if Object.const_defined?(:CommonMarker)
 
       'protocol-based JS injection: null char' => [
         "<img src=java\0script:alert(\"XSS\")>",
-        '<img src="java">'
-        # '<img>'
+        #'<img src="java">'
+        '<img>'
       ],
 
       'protocol-based JS injection: invalid URL char' => [
@@ -202,8 +202,8 @@ if Object.const_defined?(:CommonMarker)
 
       'protocol-based JS injection: spaces and entities' => [
         '<img src=" &#14;  javascript:alert(\'XSS\');">',
-        '<img src="">'
-        # '<img>'
+        #'<img src="">'
+        '<img>'
       ],
 
       'protocol whitespace' => [