aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ruby-sanitize-system-libxml.patch
blob: d19eb07294c179fb8e175ddd4c18daafa8d5e274 (about) (plain)
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
31
32
33
34
35
36
37
38
Fix test failures that occur when nokogiri is using system libxml:

  https://github.com/rgrove/sanitize/issues/198

Taken from upstream:
https://github.com/rgrove/sanitize/commit/21da9b62baf9ea659811d92e6b574130aee57eba

diff --git a/test/test_malicious_html.rb b/test/test_malicious_html.rb
index 2c23074..0756de0 100644
--- a/test/test_malicious_html.rb
+++ b/test/test_malicious_html.rb
@@ -135,6 +135,8 @@
   # The relevant libxml2 code is here:
   # <https://github.com/GNOME/libxml2/commit/960f0e275616cadc29671a218d7fb9b69eb35588>
   describe 'unsafe libxml2 server-side includes in attributes' do
+    using_unpatched_libxml2 = Nokogiri::VersionInfo.instance.libxml2_using_system?
+
     tag_configs = [
       {
         tag_name: 'a',
@@ -166,6 +168,8 @@
         input = %[<#{tag_name} #{attr_name}='examp<!--" onmouseover=alert(1)>-->le.com'>foo</#{tag_name}>]
 
         it 'should escape unsafe characters in attributes' do
+          skip "behavior should only exist in nokogiri's patched libxml" if using_unpatched_libxml2
+
           # This uses Nokogumbo's HTML-compliant serializer rather than
           # libxml2's.
           @s.fragment(input).
@@ -191,6 +195,8 @@
         input = %[<#{tag_name} #{attr_name}='examp<!--" onmouseover=alert(1)>-->le.com'>foo</#{tag_name}>]
 
         it 'should not escape characters unnecessarily' do
+          skip "behavior should only exist in nokogiri's patched libxml" if using_unpatched_libxml2
+
           # This uses Nokogumbo's HTML-compliant serializer rather than
           # libxml2's.
           @s.fragment(input).
:24:34 +0100'>2018-03-09gnu: 'autoconf-wrapper' is no longer a procedure....Fixes <https://bugs.gnu.org/30710>. Suggested by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>. * gnu/packages/autotools.scm (autoconf-wrapper): Rename to... (make-autoconf-wrapper): ... this. Add 'properties' field. (autoconf-wrapper): New variable. * gnu/packages/gnunet.scm (guile-gnunet): Adjust accordingly. * gnu/packages/gnupg.scm (signing-party): Likewise. * gnu/packages/guile.scm (guile-ics, guile-bash): Likewise. * gnu/packages/libevent.scm (libuv): Likewise. * gnu/packages/logging.scm (glog): Likewise. * gnu/packages/mail.scm (libetpan): Likewise. * gnu/packages/mate.scm (mate-icon-theme-faenza) (mate-screensaver): Likewise. * gnu/packages/package-management.scm (guix): Likewise. * gnu/packages/sawfish.scm (librep): Likewise. * gnu/packages/video.scm (motion): Likewise. * gnu/packages/zile.scm (zile-on-guile): Likewise. Ludovic Courtès 2018-03-08gnu: libuv: Update to 1.19.2....* gnu/packages/libevent.scm (libuv): Update to 1.19.2. Marius Bakke 2018-02-20gnu: libuv: Update to 1.19.1....* gnu/packages/libevent.scm (libuv): Update to 1.19.1. [arguments]: Use INVOKE instead of SYSTEM*. Marius Bakke 2017-12-31Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner 2017-12-26gnu: libev: Improve the description....* gnu/packages/libevent.scm (libev)[description]: Rewrite to be more descriptive and less judgmental, based on Debian's description. Mark H Weaver