nokogiri 1.19.1-arm-linux-gnu → 1.19.3-arm-linux-gnu

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51189bdfd50852868755d1e60921601f0be4a98d7783a777e50f8c57da65bc08
4
- data.tar.gz: 761ef0aa93ca5c519636c778e226cb7a7c3a791a80ec3db441cbf2dbec7cc99d
3
+ metadata.gz: 2168589395c3752597df98b818769d6beccaed1bda81df63102353b0d135b7b1
4
+ data.tar.gz: fb92bdbb3a84ddf83cba2ca9655dfc047464cc775d16af0c1d70eb7cc19a1016
5
5
  SHA512:
6
- metadata.gz: 2c04634c444369ad55f9ecd2d29ebb280b081c2c6e599b7380c3d9b72d7dad10aef1909da5d55d8ed3915d6ba7234b1de8093b7d1d008c443b2421af8d2fe1e3
7
- data.tar.gz: ee9485b602a67975c6faa16ee8729815b621e0cc3d2f43890e271b43bb392d8e57ff7fdc67845b3acac562adc870301b94eeeec0bd3f7b298460df6807b8a6cf
6
+ metadata.gz: 05061ac794a5e305ba7230e8f14f4a108b040ae33397bba71631e568f8a474a1835cfeeb6a35f7cdfc7e7798f19421136ea465652a1d310f2d7f97bc67bf9160
7
+ data.tar.gz: 7ba85bfad2f25bcc7bc29e884c0f836fc0690c801130cabe31b3dd0dce1c29ca722b5eca6db1ca0456a85d2ed5fb76903c9baea18e68b872dcafb068d28289c4
@@ -25,6 +25,7 @@ Note that this document is broken into multiple sections, each of which describe
25
25
  * [net.sourceforge.htmlunit:neko-htmlunit](#netsourceforgehtmlunitneko-htmlunit)
26
26
  * [nu.validator:jing](#nuvalidatorjing)
27
27
  * [org.nokogiri:nekodtd](#orgnokogirinekodtd)
28
+ * [org.xmlresolver:xmlresolver](#orgxmlresolverxmlresolver)
28
29
  * [xalan:serializer and xalan:xalan](#xalanserializer-and-xalanxalan)
29
30
  * [xerces:xercesImpl](#xercesxercesimpl)
30
31
  * [xml-apis:xml-apis](#xml-apisxml-apis)
@@ -98,6 +99,7 @@ The Java platform release distributes the following dependencies as compiled jar
98
99
  * [net.sourceforge.htmlunit:neko-htmlunit](#netsourceforgehtmlunitneko-htmlunit)
99
100
  * [nu.validator:jing](#nuvalidatorjing)
100
101
  * [org.nokogiri:nekodtd](#orgnokogirinekodtd)
102
+ * [org.xmlresolver:xmlresolver](#orgxmlresolverxmlresolver)
101
103
  * [xalan:serializer and xalan:xalan](#xalanserializer-and-xalanxalan)
102
104
  * [xerces:xercesImpl](#xercesxercesimpl)
103
105
  * [xml-apis:xml-apis](#xml-apisxml-apis)
@@ -1661,6 +1663,191 @@ https://github.com/sparklemotion/nekodtd
1661
1663
  END OF TERMS AND CONDITIONS
1662
1664
 
1663
1665
 
1666
+ ### org.xmlresolver:xmlresolver
1667
+
1668
+ Apache 2.0
1669
+
1670
+ https://xmlresolver.org/
1671
+
1672
+ Apache License
1673
+ Version 2.0, January 2004
1674
+ http://www.apache.org/licenses/
1675
+
1676
+
1677
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1678
+
1679
+ 1. Definitions.
1680
+
1681
+ "License" shall mean the terms and conditions for use, reproduction,
1682
+ and distribution as defined by Sections 1 through 9 of this document.
1683
+
1684
+ "Licensor" shall mean the copyright owner or entity authorized by
1685
+ the copyright owner that is granting the License.
1686
+
1687
+ "Legal Entity" shall mean the union of the acting entity and all
1688
+ other entities that control, are controlled by, or are under common
1689
+ control with that entity. For the purposes of this definition,
1690
+ "control" means (i) the power, direct or indirect, to cause the
1691
+ direction or management of such entity, whether by contract or
1692
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
1693
+ outstanding shares, or (iii) beneficial ownership of such entity.
1694
+
1695
+ "You" (or "Your") shall mean an individual or Legal Entity
1696
+ exercising permissions granted by this License.
1697
+
1698
+ "Source" form shall mean the preferred form for making modifications,
1699
+ including but not limited to software source code, documentation
1700
+ source, and configuration files.
1701
+
1702
+ "Object" form shall mean any form resulting from mechanical
1703
+ transformation or translation of a Source form, including but
1704
+ not limited to compiled object code, generated documentation,
1705
+ and conversions to other media types.
1706
+
1707
+ "Work" shall mean the work of authorship, whether in Source or
1708
+ Object form, made available under the License, as indicated by a
1709
+ copyright notice that is included in or attached to the work
1710
+ (an example is provided in the Appendix below).
1711
+
1712
+ "Derivative Works" shall mean any work, whether in Source or Object
1713
+ form, that is based on (or derived from) the Work and for which the
1714
+ editorial revisions, annotations, elaborations, or other modifications
1715
+ represent, as a whole, an original work of authorship. For the purposes
1716
+ of this License, Derivative Works shall not include works that remain
1717
+ separable from, or merely link (or bind by name) to the interfaces of,
1718
+ the Work and Derivative Works thereof.
1719
+
1720
+ "Contribution" shall mean any work of authorship, including
1721
+ the original version of the Work and any modifications or additions
1722
+ to that Work or Derivative Works thereof, that is intentionally
1723
+ submitted to Licensor for inclusion in the Work by the copyright owner
1724
+ or by an individual or Legal Entity authorized to submit on behalf of
1725
+ the copyright owner. For the purposes of this definition, "submitted"
1726
+ means any form of electronic, verbal, or written communication sent
1727
+ to the Licensor or its representatives, including but not limited to
1728
+ communication on electronic mailing lists, source code control systems,
1729
+ and issue tracking systems that are managed by, or on behalf of, the
1730
+ Licensor for the purpose of discussing and improving the Work, but
1731
+ excluding communication that is conspicuously marked or otherwise
1732
+ designated in writing by the copyright owner as "Not a Contribution."
1733
+
1734
+ "Contributor" shall mean Licensor and any individual or Legal Entity
1735
+ on behalf of whom a Contribution has been received by Licensor and
1736
+ subsequently incorporated within the Work.
1737
+
1738
+ 2. Grant of Copyright License. Subject to the terms and conditions of
1739
+ this License, each Contributor hereby grants to You a perpetual,
1740
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
1741
+ copyright license to reproduce, prepare Derivative Works of,
1742
+ publicly display, publicly perform, sublicense, and distribute the
1743
+ Work and such Derivative Works in Source or Object form.
1744
+
1745
+ 3. Grant of Patent License. Subject to the terms and conditions of
1746
+ this License, each Contributor hereby grants to You a perpetual,
1747
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
1748
+ (except as stated in this section) patent license to make, have made,
1749
+ use, offer to sell, sell, import, and otherwise transfer the Work,
1750
+ where such license applies only to those patent claims licensable
1751
+ by such Contributor that are necessarily infringed by their
1752
+ Contribution(s) alone or by combination of their Contribution(s)
1753
+ with the Work to which such Contribution(s) was submitted. If You
1754
+ institute patent litigation against any entity (including a
1755
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
1756
+ or a Contribution incorporated within the Work constitutes direct
1757
+ or contributory patent infringement, then any patent licenses
1758
+ granted to You under this License for that Work shall terminate
1759
+ as of the date such litigation is filed.
1760
+
1761
+ 4. Redistribution. You may reproduce and distribute copies of the
1762
+ Work or Derivative Works thereof in any medium, with or without
1763
+ modifications, and in Source or Object form, provided that You
1764
+ meet the following conditions:
1765
+
1766
+ (a) You must give any other recipients of the Work or
1767
+ Derivative Works a copy of this License; and
1768
+
1769
+ (b) You must cause any modified files to carry prominent notices
1770
+ stating that You changed the files; and
1771
+
1772
+ (c) You must retain, in the Source form of any Derivative Works
1773
+ that You distribute, all copyright, patent, trademark, and
1774
+ attribution notices from the Source form of the Work,
1775
+ excluding those notices that do not pertain to any part of
1776
+ the Derivative Works; and
1777
+
1778
+ (d) If the Work includes a "NOTICE" text file as part of its
1779
+ distribution, then any Derivative Works that You distribute must
1780
+ include a readable copy of the attribution notices contained
1781
+ within such NOTICE file, excluding those notices that do not
1782
+ pertain to any part of the Derivative Works, in at least one
1783
+ of the following places: within a NOTICE text file distributed
1784
+ as part of the Derivative Works; within the Source form or
1785
+ documentation, if provided along with the Derivative Works; or,
1786
+ within a display generated by the Derivative Works, if and
1787
+ wherever such third-party notices normally appear. The contents
1788
+ of the NOTICE file are for informational purposes only and
1789
+ do not modify the License. You may add Your own attribution
1790
+ notices within Derivative Works that You distribute, alongside
1791
+ or as an addendum to the NOTICE text from the Work, provided
1792
+ that such additional attribution notices cannot be construed
1793
+ as modifying the License.
1794
+
1795
+ You may add Your own copyright statement to Your modifications and
1796
+ may provide additional or different license terms and conditions
1797
+ for use, reproduction, or distribution of Your modifications, or
1798
+ for any such Derivative Works as a whole, provided Your use,
1799
+ reproduction, and distribution of the Work otherwise complies with
1800
+ the conditions stated in this License.
1801
+
1802
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
1803
+ any Contribution intentionally submitted for inclusion in the Work
1804
+ by You to the Licensor shall be under the terms and conditions of
1805
+ this License, without any additional terms or conditions.
1806
+ Notwithstanding the above, nothing herein shall supersede or modify
1807
+ the terms of any separate license agreement you may have executed
1808
+ with Licensor regarding such Contributions.
1809
+
1810
+ 6. Trademarks. This License does not grant permission to use the trade
1811
+ names, trademarks, service marks, or product names of the Licensor,
1812
+ except as required for reasonable and customary use in describing the
1813
+ origin of the Work and reproducing the content of the NOTICE file.
1814
+
1815
+ 7. Disclaimer of Warranty. Unless required by applicable law or
1816
+ agreed to in writing, Licensor provides the Work (and each
1817
+ Contributor provides its Contributions) on an "AS IS" BASIS,
1818
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1819
+ implied, including, without limitation, any warranties or conditions
1820
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
1821
+ PARTICULAR PURPOSE. You are solely responsible for determining the
1822
+ appropriateness of using or redistributing the Work and assume any
1823
+ risks associated with Your exercise of permissions under this License.
1824
+
1825
+ 8. Limitation of Liability. In no event and under no legal theory,
1826
+ whether in tort (including negligence), contract, or otherwise,
1827
+ unless required by applicable law (such as deliberate and grossly
1828
+ negligent acts) or agreed to in writing, shall any Contributor be
1829
+ liable to You for damages, including any direct, indirect, special,
1830
+ incidental, or consequential damages of any character arising as a
1831
+ result of this License or out of the use or inability to use the
1832
+ Work (including but not limited to damages for loss of goodwill,
1833
+ work stoppage, computer failure or malfunction, or any and all
1834
+ other commercial damages or losses), even if such Contributor
1835
+ has been advised of the possibility of such damages.
1836
+
1837
+ 9. Accepting Warranty or Additional Liability. While redistributing
1838
+ the Work or Derivative Works thereof, You may choose to offer,
1839
+ and charge a fee for, acceptance of support, warranty, indemnity,
1840
+ or other liability obligations and/or rights consistent with this
1841
+ License. However, in accepting such obligations, You may act only
1842
+ on Your own behalf and on Your sole responsibility, not on behalf
1843
+ of any other Contributor, and only if You agree to indemnify,
1844
+ defend, and hold each Contributor harmless for any liability
1845
+ incurred by, or claims asserted against, such Contributor by reason
1846
+ of your accepting any such warranty or additional liability.
1847
+
1848
+ END OF TERMS AND CONDITIONS
1849
+
1850
+
1664
1851
  ### xalan:serializer and xalan:xalan
1665
1852
 
1666
1853
  Apache 2.0
@@ -133,6 +133,35 @@ rb_xslt_stylesheet_serialize(VALUE self, VALUE xmlobj)
133
133
  return rval ;
134
134
  }
135
135
 
136
+
137
+ /*
138
+ * Build the C-string params array passed to xsltApplyStylesheet.
139
+ *
140
+ * Note: params[j] is a raw pointer into a Ruby string's buffer, and we do not pin the underlying
141
+ * VALUEs against GC compaction. This is safe (despite not pinning the VALUEs) because libxslt fully
142
+ * processes params (interning names, evaluating values) before template execution begins, and Ruby
143
+ * callbacks can only run during template execution. By the time GC compaction is reachable, libxslt
144
+ * no longer reads params[].
145
+ */
146
+ typedef struct {
147
+ VALUE rb_param;
148
+ long param_len;
149
+ const char **params;
150
+ } build_xslt_params_args_t;
151
+
152
+ static VALUE
153
+ build_xslt_params(VALUE args_ptr)
154
+ {
155
+ build_xslt_params_args_t *args = (build_xslt_params_args_t *)args_ptr;
156
+
157
+ for (long j = 0; j < args->param_len; j++) {
158
+ VALUE entry = rb_ary_entry(args->rb_param, j);
159
+ args->params[j] = StringValueCStr(entry);
160
+ }
161
+
162
+ return Qnil;
163
+ }
164
+
136
165
  /*
137
166
  * call-seq:
138
167
  * transform(document)
@@ -254,7 +283,7 @@ rb_xslt_stylesheet_transform(int argc, VALUE *argv, VALUE self)
254
283
  xmlDocPtr c_result_document ;
255
284
  nokogiriXsltStylesheetTuple *wrapper;
256
285
  const char **params ;
257
- long param_len, j ;
286
+ long param_len ;
258
287
  int parse_error_occurred ;
259
288
  int defensive_copy_p = 0;
260
289
 
@@ -277,10 +306,17 @@ rb_xslt_stylesheet_transform(int argc, VALUE *argv, VALUE self)
277
306
 
278
307
  param_len = RARRAY_LEN(rb_param);
279
308
  params = ruby_xcalloc((size_t)param_len + 1, sizeof(char *));
280
- for (j = 0 ; j < param_len ; j++) {
281
- VALUE entry = rb_ary_entry(rb_param, j);
282
- const char *ptr = StringValueCStr(entry);
283
- params[j] = ptr;
309
+ {
310
+ // populate params under rb_protect so that a raise from StringValueCStr
311
+ // (e.g. on a null byte) does not leak the params allocation.
312
+ build_xslt_params_args_t args = { rb_param, param_len, params };
313
+ int state = 0;
314
+
315
+ rb_protect(build_xslt_params, (VALUE)&args, &state);
316
+ if (state) {
317
+ ruby_xfree(params);
318
+ rb_jump_tag(state);
319
+ }
284
320
  }
285
321
  params[param_len] = 0 ;
286
322
 
Binary file
Binary file
Binary file
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  #--
3
3
  # DO NOT MODIFY!!!!
4
- # This file is automatically generated by rex 1.0.7
4
+ # This file is automatically generated by rex 1.0.8
5
5
  # from lexical definition file "lib/nokogiri/css/tokenizer.rex".
6
6
  #++
7
7
 
@@ -63,13 +63,13 @@ class Tokenizer
63
63
  when (text = @ss.scan(/has\([\s]*/))
64
64
  action { [:HAS, text] }
65
65
 
66
- when (text = @ss.scan(/-?([_A-Za-z]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))([_A-Za-z0-9-]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))*\([\s]*/))
66
+ when (text = @ss.scan(/-?(?>[_A-Za-z]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))(?>[_A-Za-z0-9-]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))*\([\s]*/))
67
67
  action { [:FUNCTION, text] }
68
68
 
69
- when (text = @ss.scan(/-?([_A-Za-z]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))([_A-Za-z0-9-]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))*/))
69
+ when (text = @ss.scan(/-?(?>[_A-Za-z]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))(?>[_A-Za-z0-9-]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))*/))
70
70
  action { [:IDENT, text] }
71
71
 
72
- when (text = @ss.scan(/\#([_A-Za-z0-9-]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))+/))
72
+ when (text = @ss.scan(/\#(?>[_A-Za-z0-9-]|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))+/))
73
73
  action { [:HASH, text] }
74
74
 
75
75
  when (text = @ss.scan(/[\s]*~=[\s]*/))
@@ -132,7 +132,7 @@ class Tokenizer
132
132
  when (text = @ss.scan(/[\s]+/))
133
133
  action { [:S, text] }
134
134
 
135
- when (text = @ss.scan(/("([^\n\r\f"]|(\n|\r\n|\r|\f)|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))*(?<!\\)(?:\\{2})*"|'([^\n\r\f']|(\n|\r\n|\r|\f)|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))*(?<!\\)(?:\\{2})*')/))
135
+ when (text = @ss.scan(/("(?>[^\n\r\f"\\]|\\?(\n|\r\n|\r|\f)|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))*"|'(?>[^\n\r\f'\\]|\\?(\n|\r\n|\r|\f)|[^\0-\177]|(\\[0-9A-Fa-f]{1,6}(\r\n|[\s])?|\\[^\n\r\f0-9A-Fa-f]))*')/))
136
136
  action { [:STRING, text] }
137
137
 
138
138
  when (text = @ss.scan(/./))
@@ -11,13 +11,13 @@ macro
11
11
  unicode \\[0-9A-Fa-f]{1,6}(\r\n|[\s])?
12
12
 
13
13
  escape ({unicode}|\\[^\n\r\f0-9A-Fa-f])
14
- nmchar ([_A-Za-z0-9-]|{nonascii}|{escape})
15
- nmstart ([_A-Za-z]|{nonascii}|{escape})
14
+ nmchar (?>[_A-Za-z0-9-]|{nonascii}|{escape})
15
+ nmstart (?>[_A-Za-z]|{nonascii}|{escape})
16
16
  name {nmstart}{nmchar}*
17
17
  ident -?{name}
18
18
  charref {nmchar}+
19
- string1 "([^\n\r\f"]|{nl}|{nonascii}|{escape})*(?<!\\)(?:\\{2})*"
20
- string2 '([^\n\r\f']|{nl}|{nonascii}|{escape})*(?<!\\)(?:\\{2})*'
19
+ string1 "(?>[^\n\r\f"\\]|\\?{nl}|{nonascii}|{escape})*"
20
+ string2 '(?>[^\n\r\f'\\]|\\?{nl}|{nonascii}|{escape})*'
21
21
  string ({string1}|{string2})
22
22
 
23
23
  rule
@@ -2,37 +2,42 @@
2
2
  begin
3
3
  require 'jar_dependencies'
4
4
  rescue LoadError
5
- require 'xalan/serializer/2.7.3/serializer-2.7.3.jar'
5
+ require 'isorelax/isorelax/20030108/isorelax-20030108.jar'
6
+ require 'org/nokogiri/nekodtd/0.1.11.noko2/nekodtd-0.1.11.noko2.jar'
6
7
  require 'net/sourceforge/htmlunit/neko-htmlunit/2.63.0/neko-htmlunit-2.63.0.jar'
8
+ require 'net/sf/saxon/Saxon-HE/12.7/Saxon-HE-12.7.jar'
9
+ require 'org/xmlresolver/xmlresolver/5.3.3/xmlresolver-5.3.3.jar'
10
+ require 'org/xmlresolver/xmlresolver/5.3.3/xmlresolver-5.3.3-data.jar'
7
11
  require 'nu/validator/jing/20200702VNU/jing-20200702VNU.jar'
8
- require 'xerces/xercesImpl/2.12.2/xercesImpl-2.12.2.jar'
9
- require 'net/sf/saxon/Saxon-HE/9.6.0-4/Saxon-HE-9.6.0-4.jar'
12
+ require 'xalan/serializer/2.7.3/serializer-2.7.3.jar'
10
13
  require 'xalan/xalan/2.7.3/xalan-2.7.3.jar'
14
+ require 'xerces/xercesImpl/2.12.2/xercesImpl-2.12.2.jar'
11
15
  require 'xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar'
12
- require 'org/nokogiri/nekodtd/0.1.11.noko2/nekodtd-0.1.11.noko2.jar'
13
- require 'isorelax/isorelax/20030108/isorelax-20030108.jar'
14
16
  end
15
17
 
16
18
  if defined? Jars
17
- require_jar 'xalan', 'serializer', '2.7.3'
19
+ require_jar 'isorelax', 'isorelax', '20030108'
20
+ require_jar 'org.nokogiri', 'nekodtd', '0.1.11.noko2'
18
21
  require_jar 'net.sourceforge.htmlunit', 'neko-htmlunit', '2.63.0'
22
+ require_jar 'net.sf.saxon', 'Saxon-HE', '12.7'
23
+ require_jar 'org.xmlresolver', 'xmlresolver', '5.3.3'
24
+ require_jar 'org.xmlresolver', 'xmlresolver', 'data', '5.3.3'
19
25
  require_jar 'nu.validator', 'jing', '20200702VNU'
20
- require_jar 'xerces', 'xercesImpl', '2.12.2'
21
- require_jar 'net.sf.saxon', 'Saxon-HE', '9.6.0-4'
26
+ require_jar 'xalan', 'serializer', '2.7.3'
22
27
  require_jar 'xalan', 'xalan', '2.7.3'
28
+ require_jar 'xerces', 'xercesImpl', '2.12.2'
23
29
  require_jar 'xml-apis', 'xml-apis', '1.4.01'
24
- require_jar 'org.nokogiri', 'nekodtd', '0.1.11.noko2'
25
- require_jar 'isorelax', 'isorelax', '20030108'
26
30
  end
27
31
 
28
32
  module Nokogiri
29
33
  # generated by the :vendor_jars rake task
30
34
  JAR_DEPENDENCIES = {
31
35
  "isorelax:isorelax" => "20030108",
32
- "net.sf.saxon:Saxon-HE" => "9.6.0-4",
36
+ "net.sf.saxon:Saxon-HE" => "12.7",
33
37
  "net.sourceforge.htmlunit:neko-htmlunit" => "2.63.0",
34
38
  "nu.validator:jing" => "20200702VNU",
35
39
  "org.nokogiri:nekodtd" => "0.1.11.noko2",
40
+ "org.xmlresolver:xmlresolver" => "5.3.3",
36
41
  "xalan:serializer" => "2.7.3",
37
42
  "xalan:xalan" => "2.7.3",
38
43
  "xerces:xercesImpl" => "2.12.2",
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nokogiri
4
4
  # The version of Nokogiri you are using
5
- VERSION = "1.19.1"
5
+ VERSION = "1.19.3"
6
6
  end
@@ -76,12 +76,12 @@ module Nokogiri
76
76
  #
77
77
  # ⚠ This option enables entity substitution, contrary to what the name implies.
78
78
  #
79
- # <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
79
+ # 🛡 <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
80
80
  NOENT = 1 << 1
81
81
 
82
82
  # Load external subsets. On by default for XSLT::Stylesheet.
83
83
  #
84
- # <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
84
+ # 🛡 <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
85
85
  DTDLOAD = 1 << 2
86
86
 
87
87
  # Default DTD attributes. On by default for XSLT::Stylesheet.
@@ -111,7 +111,7 @@ module Nokogiri
111
111
  # Forbid network access. On by default for XML::Document, XML::DocumentFragment,
112
112
  # HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema.
113
113
  #
114
- # <b>It is UNSAFE to unset this option</b> when parsing untrusted documents.
114
+ # 🛡 <b>It is UNSAFE to unset this option</b> when parsing untrusted documents.
115
115
  NONET = 1 << 11
116
116
 
117
117
  # Do not reuse the context dictionary. Off by default.
@@ -128,8 +128,7 @@ module Nokogiri
128
128
 
129
129
  # Compact small text nodes. Off by default.
130
130
  #
131
- # ⚠ No modification of the DOM tree is allowed after parsing. libxml2 may crash if you try to
132
- # modify the tree.
131
+ # ⚠ No modification of the DOM tree is allowed after parsing.
133
132
  COMPACT = 1 << 16
134
133
 
135
134
  # Parse using XML-1.0 before update 5. Off by default
@@ -140,7 +139,7 @@ module Nokogiri
140
139
 
141
140
  # Relax any hardcoded limit from the parser. Off by default.
142
141
  #
143
- # <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
142
+ # 🛡 <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
144
143
  HUGE = 1 << 19
145
144
 
146
145
  # Support line numbers up to <code>long int</code> (default is a <code>short int</code>). On
@@ -151,7 +150,12 @@ module Nokogiri
151
150
  # The options mask used by default for parsing XML::Document and XML::DocumentFragment
152
151
  DEFAULT_XML = RECOVER | NONET | BIG_LINES
153
152
 
154
- # The options mask used by default used for parsing XSLT::Stylesheet
153
+ # Shorthand options mask useful for parsing XSLT stylesheets:
154
+ # sets RECOVER, NONET, NOENT, DTDLOAD, DTDATTR, NOCDATA, BIG_LINES.
155
+ #
156
+ # 🛡 This option set includes `NOENT` and `DTDLOAD` which are unsafe for untrusted
157
+ # documents. <b>Do not parse untrusted XSLT stylesheets.</b> See Nokogiri::XSLT for more
158
+ # information.
155
159
  DEFAULT_XSLT = RECOVER | NONET | NOENT | DTDLOAD | DTDATTR | NOCDATA | BIG_LINES
156
160
 
157
161
  # The options mask used by default used for parsing HTML4::Document and HTML4::DocumentFragment
@@ -39,7 +39,7 @@ module Nokogiri
39
39
  # of ParserContext#replace_entities. (Recall that the default value of
40
40
  # ParserContext#replace_entities is `false`.)
41
41
  #
42
- # <b>It is UNSAFE to set ParserContext#replace_entities to `true`</b> when parsing untrusted
42
+ # 🛡 <b>It is UNSAFE to set ParserContext#replace_entities to `true`</b> when parsing untrusted
43
43
  # documents.
44
44
  #
45
45
  # 💡 For more information on entity types, see [Wikipedia's page on
@@ -3,15 +3,20 @@
3
3
  module Nokogiri
4
4
  module XSLT
5
5
  ###
6
- # A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation
7
- # is done through Nokogiri.XSLT. Here is an example of transforming
8
- # an XML::Document with a Stylesheet:
6
+ # A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation is done through
7
+ # Nokogiri::XSLT.parse (or the convenience method Nokogiri.XSLT). Here is an example of
8
+ # transforming an XML::Document with a Stylesheet:
9
9
  #
10
10
  # doc = Nokogiri::XML(File.read('some_file.xml'))
11
11
  # xslt = Nokogiri::XSLT(File.read('some_transformer.xslt'))
12
12
  #
13
13
  # xslt.transform(doc) # => Nokogiri::XML::Document
14
14
  #
15
+ # 🛡 <b>This class does not support execution of untrusted stylesheets.</b> An untrusted
16
+ # stylesheet may consume a large amount of CPU, memory, or other system resources during
17
+ # transformation, and IO and file access are not restricted. See Nokogiri::XSLT for more
18
+ # information about the security implications of untrusted stylesheets.
19
+ #
15
20
  # Many XSLT transformations include serialization behavior to emit a non-XML document. For these
16
21
  # cases, please take care to invoke the #serialize method on the result of the transformation:
17
22
  #
data/lib/nokogiri/xslt.rb CHANGED
@@ -10,8 +10,14 @@ module Nokogiri
10
10
  end
11
11
 
12
12
  ###
13
- # See Nokogiri::XSLT::Stylesheet for creating and manipulating
14
- # Stylesheet object.
13
+ # See Nokogiri::XSLT::Stylesheet for creating and manipulating Stylesheet objects.
14
+ #
15
+ # 🛡 <b>Do not use this module for untrusted stylesheet documents.</b> libxslt does not support
16
+ # safely processing untrusted stylesheets. Untrusted stylesheets may access the file system and
17
+ # network, consume large amounts of CPU, memory, or other system resources, and IO and file
18
+ # access are not restricted. Additionally, the stylesheet is parsed by libxml2 with +NOENT+ and
19
+ # +DTDLOAD+ enabled (see ParseOptions::DEFAULT_XSLT), meaning that <b>external entities will be
20
+ # resolved and external subsets will be loaded</b> during parsing.
15
21
  module XSLT
16
22
  class << self
17
23
  # :call-seq:
@@ -20,6 +26,9 @@ module Nokogiri
20
26
  #
21
27
  # Parse the stylesheet in +xsl+, registering optional +modules+ as custom class handlers.
22
28
  #
29
+ # 🛡 <b>Do not pass untrusted stylesheet content to this method.</b> See Nokogiri::XSLT for more
30
+ # information.
31
+ #
23
32
  # [Parameters]
24
33
  # - +xsl+ (String) XSL content to be parsed into a stylesheet
25
34
  # - +modules+ (Hash<String ⇒ Class>) A hash of URI-to-handler relations for linking a
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 1.19.3
5
5
  platform: arm-linux-gnu
6
6
  authors:
7
7
  - Mike Dalessio