nokogiri-xmlsec1 0.0.6
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 +7 -0
- data/.gitignore +22 -0
- data/.rspec +2 -0
- data/.travis.yml +11 -0
- data/Gemfile +4 -0
- data/Guardfile +13 -0
- data/LICENSE.txt +22 -0
- data/README.md +133 -0
- data/Rakefile +30 -0
- data/dependencies.yml +3 -0
- data/ext/nokogiri_ext_xmlsec/extconf.rb +489 -0
- data/ext/nokogiri_ext_xmlsec/init.c +46 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_decrypt_with_key.c +124 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_encrypt_with_key.c +182 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_helpers_set_attribute_id.c +43 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_init.c +32 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_sign_certificate.c +104 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_sign_rsa.c +95 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_verify_signature_certificates.c +96 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_verify_signature_named_keys.c +106 -0
- data/ext/nokogiri_ext_xmlsec/nokogiri_verify_signature_rsa.c +56 -0
- data/ext/nokogiri_ext_xmlsec/shutdown.c +12 -0
- data/ext/nokogiri_ext_xmlsec/xmlsecrb.h +39 -0
- data/lib/nokogiri-xmlsec.rb +1 -0
- data/lib/xmlsec.rb +110 -0
- data/lib/xmlsec/version.rb +3 -0
- data/nokogiri-xmlsec1.gemspec +46 -0
- data/ports/patches/libxml2/0001-Fix-parser-local-buffers-size-problems.patch +265 -0
- data/ports/patches/libxml2/0002-Fix-entities-local-buffers-size-problems.patch +102 -0
- data/ports/patches/libxml2/0003-Fix-an-error-in-previous-commit.patch +26 -0
- data/ports/patches/libxml2/0004-Fix-potential-out-of-bound-access.patch +26 -0
- data/ports/patches/libxml2/0005-Detect-excessive-entities-expansion-upon-replacement.patch +158 -0
- data/ports/patches/libxml2/0006-Do-not-fetch-external-parsed-entities.patch +78 -0
- data/ports/patches/libxml2/0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch +480 -0
- data/ports/patches/libxml2/0008-Improve-handling-of-xmlStopParser.patch +315 -0
- data/ports/patches/libxml2/0009-Fix-a-couple-of-return-without-value.patch +37 -0
- data/ports/patches/libxml2/0010-Keep-non-significant-blanks-node-in-HTML-parser.patch +2006 -0
- data/ports/patches/libxml2/0011-Do-not-fetch-external-parameter-entities.patch +39 -0
- data/ports/patches/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch +222 -0
- data/ports/patches/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch +53 -0
- data/ports/patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch +60 -0
- data/ports/patches/libxslt/0004-EXSLT-function-str-replace-is-broken-as-is.patch +42 -0
- data/ports/patches/libxslt/0006-Fix-str-padding-to-work-with-UTF-8-strings.patch +164 -0
- data/ports/patches/libxslt/0007-Separate-function-for-predicate-matching-in-patterns.patch +587 -0
- data/ports/patches/libxslt/0008-Fix-direct-pattern-matching.patch +80 -0
- data/ports/patches/libxslt/0009-Fix-certain-patterns-with-predicates.patch +185 -0
- data/ports/patches/libxslt/0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch +126 -0
- data/ports/patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch +25 -0
- data/ports/patches/libxslt/0014-Fix-for-bug-436589.patch +43 -0
- data/ports/patches/libxslt/0015-Fix-mkdir-for-mingw.patch +41 -0
- data/ports/patches/xmlsec1/.keep +0 -0
- data/spec/fixtures/cert/server.crt +14 -0
- data/spec/fixtures/cert/server.csr +11 -0
- data/spec/fixtures/cert/server.key.decrypted +15 -0
- data/spec/fixtures/cert/server.key.encrypted +18 -0
- data/spec/fixtures/rsa.pem +15 -0
- data/spec/fixtures/rsa.pub +6 -0
- data/spec/fixtures/sign2-doc.xml +6 -0
- data/spec/fixtures/sign2-result.xml +24 -0
- data/spec/fixtures/sign3-result.xml +37 -0
- data/spec/lib/nokogiri/xml/document/encryption_and_decryption_spec.rb +22 -0
- data/spec/lib/nokogiri/xml/document/signing_and_verifying_spec.rb +77 -0
- data/spec/spec_helper.rb +10 -0
- metadata +251 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
From 9cd1c3cfbd32655d60572c0a413e017260c854df Mon Sep 17 00:00:00 2001
|
2
|
+
From: Daniel Veillard <veillard@redhat.com>
|
3
|
+
Date: Tue, 22 Apr 2014 15:30:56 +0800
|
4
|
+
Subject: [PATCH] Do not fetch external parameter entities
|
5
|
+
|
6
|
+
Unless explicitely asked for when validating or replacing entities
|
7
|
+
with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com>
|
8
|
+
---
|
9
|
+
parser.c | 14 ++++++++++++++
|
10
|
+
1 file changed, 14 insertions(+)
|
11
|
+
|
12
|
+
diff --git a/parser.c b/parser.c
|
13
|
+
index 9347ac9..c0dea05 100644
|
14
|
+
--- a/parser.c
|
15
|
+
+++ b/parser.c
|
16
|
+
@@ -2598,6 +2598,20 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
|
17
|
+
xmlCharEncoding enc;
|
18
|
+
|
19
|
+
/*
|
20
|
+
+ * Note: external parsed entities will not be loaded, it is
|
21
|
+
+ * not required for a non-validating parser, unless the
|
22
|
+
+ * option of validating, or substituting entities were
|
23
|
+
+ * given. Doing so is far more secure as the parser will
|
24
|
+
+ * only process data coming from the document entity by
|
25
|
+
+ * default.
|
26
|
+
+ */
|
27
|
+
+ if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
|
28
|
+
+ ((ctxt->options & XML_PARSE_NOENT) == 0) &&
|
29
|
+
+ ((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
|
30
|
+
+ (ctxt->validate == 0))
|
31
|
+
+ return;
|
32
|
+
+
|
33
|
+
+ /*
|
34
|
+
* handle the extra spaces added before and after
|
35
|
+
* c.f. http://www.w3.org/TR/REC-xml#as-PE
|
36
|
+
* this is done independently.
|
37
|
+
--
|
38
|
+
1.8.3.2
|
39
|
+
|
@@ -0,0 +1,222 @@
|
|
1
|
+
From eb193589a1ff12b4ef23027d5cfed5609f8c0d11 Mon Sep 17 00:00:00 2001
|
2
|
+
From: Daniel Veillard <veillard@redhat.com>
|
3
|
+
Date: Wed, 21 Nov 2012 15:36:11 +0800
|
4
|
+
Subject: [PATCH 01/14] Adding doc update related to 1.1.28
|
5
|
+
|
6
|
+
---
|
7
|
+
NEWS | 23 +++++++++++++++
|
8
|
+
doc/libxslt.xsa | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
|
9
|
+
doc/news.html | 25 ++++++++++++++++-
|
10
|
+
doc/xslt.html | 25 +++++++++++++++++
|
11
|
+
4 files changed, 152 insertions(+), 8 deletions(-)
|
12
|
+
|
13
|
+
diff --git a/NEWS b/NEWS
|
14
|
+
index cbc1c5e..ff65b6a 100644
|
15
|
+
--- a/NEWS
|
16
|
+
+++ b/NEWS
|
17
|
+
@@ -8,6 +8,29 @@ See the git page at
|
18
|
+
http://git.gnome.org/browse/libxslt/
|
19
|
+
|
20
|
+
to get a description of the recent commits.Those are the public releases made:
|
21
|
+
+1.1.28: Nov 21 2012:
|
22
|
+
+ - Portability:
|
23
|
+
+ Fix python build by using libxsltmod_la_CPPFLAGS instead of AM_CPPFLAGS (Alexandre Rostovtsev),
|
24
|
+
+ configure should be more careful with linker script (Igor Pashev),
|
25
|
+
+ add gcrypt library in LIBADD, not LDFLAGS, as recommended (Roumen Petrov)
|
26
|
+
+
|
27
|
+
+ - Bug fixes:
|
28
|
+
+ Fix generate-id() to avoid generating the same ID (Stewart Brodie),
|
29
|
+
+ Fix crash with empty xsl:key/@match attribute (Nick Wellnhofer),
|
30
|
+
+ Crash when passing an uninitialized variable to document() (Nick Wellnhofer),
|
31
|
+
+ Add missing test docs to EXTRA_DIST (Nick Wellnhofer),
|
32
|
+
+ Fix regression: Default namespace not correctly used (Nick Wellnhofer)
|
33
|
+
+
|
34
|
+
+ - Cleanups:
|
35
|
+
+ Remove xsltTransStorageAdd and xsltTransStorageRemove from symbols.xml (Daniel Veillard),
|
36
|
+
+ autogen.sh cleanup (Daniel Richard),
|
37
|
+
+ consistent use of xslt processor (Roumen Petrov),
|
38
|
+
+ Add object files in tests/plugins to .gitignore (Nick Wellnhofer),
|
39
|
+
+ Fix error on bug-165 regression test (Daniel Veillard),
|
40
|
+
+ Remove xsltTransStorageAdd and xsltTransStorageRemove (Daniel Veillard),
|
41
|
+
+
|
42
|
+
+
|
43
|
+
+
|
44
|
+
1.1.27: Sep 12 2012:
|
45
|
+
- Portability:
|
46
|
+
xincludestyle wasn't protected with LIBXML_XINCLUDE_ENABLED (Michael Bonfils),
|
47
|
+
diff --git a/doc/libxslt.xsa b/doc/libxslt.xsa
|
48
|
+
index ad3aaf2..04d8c0d 100644
|
49
|
+
--- a/doc/libxslt.xsa
|
50
|
+
+++ b/doc/libxslt.xsa
|
51
|
+
@@ -8,16 +8,89 @@
|
52
|
+
</vendor>
|
53
|
+
<product id="libxslt">
|
54
|
+
<name>libxslt</name>
|
55
|
+
- <version>1.1.26</version>
|
56
|
+
- <last-release> Sep 24 2009</last-release>
|
57
|
+
+ <version>1.1.27</version>
|
58
|
+
+ <last-release> Sep 12 2012</last-release>
|
59
|
+
<info-url>http://xmlsoft.org/XSLT/</info-url>
|
60
|
+
- <changes> - Improvement:
|
61
|
+
- Add xsltProcessOneNode to exported symbols for lxml (Daniel Veillard)
|
62
|
+
+ <changes> - Portability:
|
63
|
+
+ xincludestyle wasn't protected with LIBXML_XINCLUDE_ENABLED (Michael Bonfils),
|
64
|
+
+ Portability fix for testThreads.c (IlyaS),
|
65
|
+
+ FreeBSD portability fixes (Pedro F. Giffuni),
|
66
|
+
+ check for gmtime - on mingw* hosts will enable date-time function (Roumen Petrov),
|
67
|
+
+ use only native crypto-API for mingw* hosts (Roumen Petrov),
|
68
|
+
+ autogen: Only check for libtoolize (Colin Walters),
|
69
|
+
+ minimal mingw support (Roumen Petrov),
|
70
|
+
+ configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost),
|
71
|
+
+ Fix a small out of tree compilation issue (Hao Hu),
|
72
|
+
+ Fix python generator to not use deprecated xmllib (Daniel Veillard),
|
73
|
+
+ link python module with python library (Frederic Crozat)
|
74
|
+
+
|
75
|
+
+ - Documentation:
|
76
|
+
+ Tiny doc improvement (Daniel Veillard),
|
77
|
+
+ Various documentation fixes for docs on internals (C. M. Sperberg-McQueen)
|
78
|
+
|
79
|
+
- Bug fixes:
|
80
|
+
- Fix an idness generation problem (Daniel Veillard),
|
81
|
+
- 595612 Try to fix some locking problems (Daniel Veillard),
|
82
|
+
- Fix a crash on misformed imported stylesheets (Daniel Veillard)
|
83
|
+
+ Report errors on variable use in key (Daniel Veillard),
|
84
|
+
+ The XSLT namespace string is a constant one (Daniel Veillard),
|
85
|
+
+ Fix handling of names in xsl:attribute (Nick Wellnhofer),
|
86
|
+
+ Reserved namespaces in xsl:element and xsl:attribute (Nick Wellnhofer),
|
87
|
+
+ Null-terminate result string of cry:rc4_decrypt (Nick Wellnhofer),
|
88
|
+
+ EXSLT date normalization fix (James Muscat),
|
89
|
+
+ Exit after compilation of invalid func:result (Nick Wellnhofer),
|
90
|
+
+ Fix for EXSLT func:function (Nick Wellnhofer),
|
91
|
+
+ Rewrite EXSLT string:replace to be conformant (Nick Wellnhofer),
|
92
|
+
+ Avoid a heap use after free error (Chris Evans),
|
93
|
+
+ Fix a dictionary string usage (Chris Evans),
|
94
|
+
+ Output should not include extraneous newlines when indent is off (Laurence Rowe),
|
95
|
+
+ document('') fails to return stylesheets parsed from memory (Jason Viers),
|
96
|
+
+ xsltproc should return an error code if xinclude fails (Malcolm Purvis),
|
97
|
+
+ Forwards-compatible processing of unknown top level elements (Nick Wellnhofer),
|
98
|
+
+ Fix system-property with unknown namespace (Nick Wellnhofer),
|
99
|
+
+ Hardening of code checking node types in EXSLT (Daniel Veillard),
|
100
|
+
+ Hardening of code checking node types in various entry point (Daniel Veillard),
|
101
|
+
+ Cleanup of the pattern compilation code (Daniel Veillard),
|
102
|
+
+ Fix default template processing on namespace nodes (Daniel Veillard),
|
103
|
+
+ Fix a bug in selecting XSLT elements (Daniel Veillard),
|
104
|
+
+ Fixed bug #616839 (Daniel Mustieles),
|
105
|
+
+ Fix some case of pattern parsing errors (Abhishek Arya),
|
106
|
+
+ preproc: fix the build (Stefan Kost),
|
107
|
+
+ Fix a memory leak with xsl:number (Daniel Veillard),
|
108
|
+
+ Fix a problem with ESXLT date:add() with January (money_seshu Dronamraju),
|
109
|
+
+ Fix a memory leak if compiled with Windows locale support (Daniel Veillard),
|
110
|
+
+ Fix generate-id() to not expose object addresses (Daniel Veillard),
|
111
|
+
+ Fix curlies support in literals for non-compiled AVTs (Nick Wellnhofer),
|
112
|
+
+ Allow whitespace in xsl:variable with select (Nick Wellnhofer),
|
113
|
+
+ Small fixes to locale code (Nick Wellnhofer),
|
114
|
+
+ Fix bug 602515 (Nick Wellnhofer),
|
115
|
+
+ Fix popping of vars in xsltCompilerNodePop (Nick Wellnhofer),
|
116
|
+
+ Fix direct pattern matching bug (Nick Wellnhofer)
|
117
|
+
+
|
118
|
+
+ - Improvements:
|
119
|
+
+ Add the saxon:systemId extension (Mike Hommey),
|
120
|
+
+ Add an append mode to document output (Daniel Veillard),
|
121
|
+
+ Add new tests to EXTRA_DIST (Nick Wellnhofer),
|
122
|
+
+ Test for bug #680920 (Nick Wellnhofer),
|
123
|
+
+ fix regresson in Various "make distcheck" and other fixes (Roumen Petrov),
|
124
|
+
+ Various "make distcheck" and other fixes (Daniel Richard G),
|
125
|
+
+ Fix portability to upcoming libxml2-2.9.0 (Daniel Veillard),
|
126
|
+
+ Adding --system flag support to autogen.sh (Daniel Veillard),
|
127
|
+
+ Allow per-context override of xsltMaxDepth, introduce xsltMaxVars (Jérôme Carretero),
|
128
|
+
+ autogen.sh: Honor NOCONFIGURE environment variable (Colin Walters),
|
129
|
+
+ configure: support silent automake rules if possible (Stefan Kost),
|
130
|
+
+ Precompile patterns in xsl:number (Nick Wellnhofer),
|
131
|
+
+ Fix some warnings in the refactored code (Nick Wellnhofer),
|
132
|
+
+ Adding new generated files (Daniel Veillard),
|
133
|
+
+ profiling: add callgraph report (Stefan Kost)
|
134
|
+
+
|
135
|
+
+ - Cleanups:
|
136
|
+
+ Big space and tabs cleanup (Daniel Veillard),
|
137
|
+
+ Fix authors list (Daniel Veillard),
|
138
|
+
+ Cleanups some of the test makefiles (Daniel Richard),
|
139
|
+
+ Remove .cvsignore files which are not needed anymore (Daniel Veillard),
|
140
|
+
+ Cleanup some misplaced spaces and tabs (Daniel Veillard),
|
141
|
+
+ Augment list of ignored files (Daniel Veillard),
|
142
|
+
+ configure: remove checks for isinf and isnan as those are not used anyway (Stefan Kost),
|
143
|
+
+ Point to GIT for source code and a bit of cleanup (Daniel Veillard),
|
144
|
+
+ Get rid of specific build setup and STATIC_BINARIES (Daniel Veillard)
|
145
|
+
|
146
|
+
|
147
|
+
</changes>
|
148
|
+
diff --git a/doc/news.html b/doc/news.html
|
149
|
+
index 15ae10d..60d242e 100644
|
150
|
+
--- a/doc/news.html
|
151
|
+
+++ b/doc/news.html
|
152
|
+
@@ -9,7 +9,30 @@ H3 {font-family: Verdana,Arial,Helvetica}
|
153
|
+
A:link, A:visited, A:active { text-decoration: underline }
|
154
|
+
</style><title>News</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="GNOME2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C logo" /></a><a href="http://www.redhat.com"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/XSLT/"><img src="Libxslt-Logo-180x168.gif" alt="Made with Libxslt Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XSLT C library for GNOME</h1><h2>News</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="intro.html">Introduction</a></li><li><a href="docs.html">Documentation</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="news.html">News</a></li><li><a href="xsltproc2.html">The xsltproc tool</a></li><li><a href="docbook.html">DocBook</a></li><li><a href="API.html">The programming API</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="internals.html">Library internals</a></li><li><a href="extensions.html">Writing extensions</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="EXSLT/index.html" style="font-weight:bold">libexslt</a></li><li><a href="xslt.html">flat page</a>, <a href="site.xsl">stylesheet</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="tutorial/libxslttutorial.html">Tutorial</a>,
|
155
|
+
<a href="tutorial2/libxslt_pipes.html">Tutorial2</a></li><li><a href="xsltproc.html">Man page for xsltproc</a></li><li><a href="http://mail.gnome.org/archives/xslt/">Mail archive</a></li><li><a href="http://xmlsoft.org/">XML libxml2</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxslt">Bug Tracker</a></li><li><a href="http://codespeak.net/lxml/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXSLT">Perl XSLT bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading17">XSLT with PHP</a></li><li><a href="http://www.mod-xslt2.com/">Apache module</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://xsldbg.sourceforge.net/">Xsldbg Debugger</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>See the <a href="http://git.gnome.org/browse/libxslt/">git page</a>
|
156
|
+
-to get a description of the recent commits.</p><p>Those are the public releases made:</p><h3>1.1.27: Sep 12 2012</h3><ul>
|
157
|
+
+to get a description of the recent commits.</p><p>Those are the public releases made:</p><h3>1.1.28: Nov 21 2012</h3><ul>
|
158
|
+
+ <li> Portability:<br />
|
159
|
+
+ Fix python build by using libxsltmod_la_CPPFLAGS instead of AM_CPPFLAGS (Alexandre Rostovtsev),<br />
|
160
|
+
+ configure should be more careful with linker script (Igor Pashev),<br />
|
161
|
+
+ add gcrypt library in LIBADD, not LDFLAGS, as recommended (Roumen Petrov)<br />
|
162
|
+
+ </li>
|
163
|
+
+
|
164
|
+
+ <li> Bug fixes:<br />
|
165
|
+
+ Fix generate-id() to avoid generating the same ID (Stewart Brodie),<br />
|
166
|
+
+ Fix crash with empty xsl:key/@match attribute (Nick Wellnhofer),<br />
|
167
|
+
+ Crash when passing an uninitialized variable to document() (Nick Wellnhofer),<br />
|
168
|
+
+ Add missing test docs to EXTRA_DIST (Nick Wellnhofer),<br />
|
169
|
+
+ Fix regression: Default namespace not correctly used (Nick Wellnhofer)<br />
|
170
|
+
+ </li>
|
171
|
+
+
|
172
|
+
+ <li> Cleanups:<br />
|
173
|
+
+ Remove xsltTransStorageAdd and xsltTransStorageRemove from symbols.xml (Daniel Veillard),<br />
|
174
|
+
+ autogen.sh cleanup (Daniel Richard),<br />
|
175
|
+
+ consistent use of xslt processor (Roumen Petrov),<br />
|
176
|
+
+ Add object files in tests/plugins to .gitignore (Nick Wellnhofer),<br />
|
177
|
+
+ Fix error on bug-165 regression test (Daniel Veillard),<br />
|
178
|
+
+ Remove xsltTransStorageAdd and xsltTransStorageRemove (Daniel Veillard),<br />
|
179
|
+
+ </li>
|
180
|
+
+</ul><h3>1.1.27: Sep 12 2012</h3><ul>
|
181
|
+
<li> Portability:<br />
|
182
|
+
xincludestyle wasn't protected with LIBXML_XINCLUDE_ENABLED (Michael Bonfils),<br />
|
183
|
+
Portability fix for testThreads.c (IlyaS),<br />
|
184
|
+
diff --git a/doc/xslt.html b/doc/xslt.html
|
185
|
+
index f7fb595..71e208f 100644
|
186
|
+
--- a/doc/xslt.html
|
187
|
+
+++ b/doc/xslt.html
|
188
|
+
@@ -305,6 +305,31 @@ to get a description of the recent commits.</p>
|
189
|
+
|
190
|
+
<p>Those are the public releases made:</p>
|
191
|
+
|
192
|
+
+<h3>1.1.28: Nov 21 2012</h3>
|
193
|
+
+<ul>
|
194
|
+
+ <li> Portability:<br/>
|
195
|
+
+ Fix python build by using libxsltmod_la_CPPFLAGS instead of AM_CPPFLAGS (Alexandre Rostovtsev),<br/>
|
196
|
+
+ configure should be more careful with linker script (Igor Pashev),<br/>
|
197
|
+
+ add gcrypt library in LIBADD, not LDFLAGS, as recommended (Roumen Petrov)<br/>
|
198
|
+
+ </li>
|
199
|
+
+
|
200
|
+
+ <li> Bug fixes:<br/>
|
201
|
+
+ Fix generate-id() to avoid generating the same ID (Stewart Brodie),<br/>
|
202
|
+
+ Fix crash with empty xsl:key/@match attribute (Nick Wellnhofer),<br/>
|
203
|
+
+ Crash when passing an uninitialized variable to document() (Nick Wellnhofer),<br/>
|
204
|
+
+ Add missing test docs to EXTRA_DIST (Nick Wellnhofer),<br/>
|
205
|
+
+ Fix regression: Default namespace not correctly used (Nick Wellnhofer)<br/>
|
206
|
+
+ </li>
|
207
|
+
+
|
208
|
+
+ <li> Cleanups:<br/>
|
209
|
+
+ Remove xsltTransStorageAdd and xsltTransStorageRemove from symbols.xml (Daniel Veillard),<br/>
|
210
|
+
+ autogen.sh cleanup (Daniel Richard),<br/>
|
211
|
+
+ consistent use of xslt processor (Roumen Petrov),<br/>
|
212
|
+
+ Add object files in tests/plugins to .gitignore (Nick Wellnhofer),<br/>
|
213
|
+
+ Fix error on bug-165 regression test (Daniel Veillard),<br/>
|
214
|
+
+ Remove xsltTransStorageAdd and xsltTransStorageRemove (Daniel Veillard),<br/>
|
215
|
+
+ </li>
|
216
|
+
+</ul>
|
217
|
+
<h3>1.1.27: Sep 12 2012</h3>
|
218
|
+
<ul>
|
219
|
+
<li> Portability:<br/>
|
220
|
+
--
|
221
|
+
1.8.4.1
|
222
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
From 90e8b9066d877e040e791bbf206db0e5653e017a Mon Sep 17 00:00:00 2001
|
2
|
+
From: Daniel Veillard <veillard@redhat.com>
|
3
|
+
Date: Wed, 30 Jan 2013 17:31:37 +0100
|
4
|
+
Subject: [PATCH 02/14] Fix a couple of places where (f)printf parameters were
|
5
|
+
broken
|
6
|
+
|
7
|
+
As reported by Thomas Jarosch <thomas.jarosch@intra2net.com>
|
8
|
+
---
|
9
|
+
python/libxslt.c | 10 +++++-----
|
10
|
+
xsltproc/xsltproc.c | 2 +-
|
11
|
+
2 files changed, 6 insertions(+), 6 deletions(-)
|
12
|
+
|
13
|
+
diff --git a/python/libxslt.c b/python/libxslt.c
|
14
|
+
index 6a4f1c3..8dd6c78 100644
|
15
|
+
--- a/python/libxslt.c
|
16
|
+
+++ b/python/libxslt.c
|
17
|
+
@@ -356,15 +356,15 @@ libxslt_xsltRegisterExtModuleElement(PyObject *self ATTRIBUTE_UNUSED,
|
18
|
+
PyObject *pyobj_element_f;
|
19
|
+
PyObject *pyobj_precomp_f;
|
20
|
+
|
21
|
+
-#ifdef DEBUG_EXTENSIONS
|
22
|
+
- printf("libxslt_xsltRegisterExtModuleElement called\n",
|
23
|
+
- name, ns_uri);
|
24
|
+
-#endif
|
25
|
+
-
|
26
|
+
if (!PyArg_ParseTuple(args, (char *)"szOO:registerExtModuleElement",
|
27
|
+
&name, &ns_uri, &pyobj_precomp_f, &pyobj_element_f))
|
28
|
+
return(NULL);
|
29
|
+
|
30
|
+
+#ifdef DEBUG_EXTENSIONS
|
31
|
+
+ printf("libxslt_xsltRegisterExtModuleElement called: %s %s\n",
|
32
|
+
+ name, ns_uri);
|
33
|
+
+#endif
|
34
|
+
+
|
35
|
+
if ((name == NULL) || (pyobj_element_f == NULL) || (pyobj_precomp_f == NULL)) {
|
36
|
+
py_retval = libxml_intWrap(-1);
|
37
|
+
return(py_retval);
|
38
|
+
diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c
|
39
|
+
index 35f37e8..dfd6d31 100644
|
40
|
+
--- a/xsltproc/xsltproc.c
|
41
|
+
+++ b/xsltproc/xsltproc.c
|
42
|
+
@@ -319,7 +319,7 @@ static void endTimer(char *format, ...)
|
43
|
+
va_start(ap, format);
|
44
|
+
vfprintf(stderr,format,ap);
|
45
|
+
va_end(ap);
|
46
|
+
- fprintf(stderr, " was not timed\n", msec);
|
47
|
+
+ fprintf(stderr, " was not timed\n");
|
48
|
+
#else
|
49
|
+
/* We don't have gettimeofday, time or stdarg.h, what crazy world is
|
50
|
+
* this ?!
|
51
|
+
--
|
52
|
+
1.8.4.1
|
53
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
From 3fcf11ead6ad226227b0a3ef4cc6565b8d5857ff Mon Sep 17 00:00:00 2001
|
2
|
+
From: Nils Werner <wernerns@iis.fraunhofer.de>
|
3
|
+
Date: Thu, 24 Jan 2013 19:44:03 +0100
|
4
|
+
Subject: [PATCH 03/14] Initialize pseudo random number generator with current
|
5
|
+
time or optional command line parameter
|
6
|
+
|
7
|
+
---
|
8
|
+
xsltproc/xsltproc.c | 15 +++++++++++++++
|
9
|
+
1 file changed, 15 insertions(+)
|
10
|
+
|
11
|
+
diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c
|
12
|
+
index dfd6d31..45adf5d 100644
|
13
|
+
--- a/xsltproc/xsltproc.c
|
14
|
+
+++ b/xsltproc/xsltproc.c
|
15
|
+
@@ -514,6 +514,7 @@ static void usage(const char *name) {
|
16
|
+
printf("\t--maxdepth val : increase the maximum depth (default %d)\n", xsltMaxDepth);
|
17
|
+
printf("\t--maxvars val : increase the maximum variables (default %d)\n", xsltMaxVars);
|
18
|
+
printf("\t--maxparserdepth val : increase the maximum parser depth\n");
|
19
|
+
+ printf("\t--seed-rand val : initialize pseudo random number generator with specific seed\n");
|
20
|
+
#ifdef LIBXML_HTML_ENABLED
|
21
|
+
printf("\t--html: the input document is(are) an HTML file(s)\n");
|
22
|
+
#endif
|
23
|
+
@@ -556,6 +557,7 @@ main(int argc, char **argv)
|
24
|
+
return (1);
|
25
|
+
}
|
26
|
+
|
27
|
+
+ srand(time(NULL));
|
28
|
+
xmlInitMemory();
|
29
|
+
|
30
|
+
LIBXML_TEST_VERSION
|
31
|
+
@@ -750,6 +752,15 @@ main(int argc, char **argv)
|
32
|
+
if (value > 0)
|
33
|
+
xmlParserMaxDepth = value;
|
34
|
+
}
|
35
|
+
+ } else if ((!strcmp(argv[i], "-seed-rand")) ||
|
36
|
+
+ (!strcmp(argv[i], "--seed-rand"))) {
|
37
|
+
+ int value;
|
38
|
+
+
|
39
|
+
+ i++;
|
40
|
+
+ if (sscanf(argv[i], "%d", &value) == 1) {
|
41
|
+
+ if (value > 0)
|
42
|
+
+ srand(value);
|
43
|
+
+ }
|
44
|
+
} else if ((!strcmp(argv[i],"-dumpextensions"))||
|
45
|
+
(!strcmp(argv[i],"--dumpextensions"))) {
|
46
|
+
dumpextensions++;
|
47
|
+
@@ -786,6 +797,10 @@ main(int argc, char **argv)
|
48
|
+
(!strcmp(argv[i], "--maxparserdepth"))) {
|
49
|
+
i++;
|
50
|
+
continue;
|
51
|
+
+ } else if ((!strcmp(argv[i], "-seed-rand")) ||
|
52
|
+
+ (!strcmp(argv[i], "--seed-rand"))) {
|
53
|
+
+ i++;
|
54
|
+
+ continue;
|
55
|
+
} else if ((!strcmp(argv[i], "-o")) ||
|
56
|
+
(!strcmp(argv[i], "-output")) ||
|
57
|
+
(!strcmp(argv[i], "--output"))) {
|
58
|
+
--
|
59
|
+
1.8.4.1
|
60
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
From ae49d7a73b043bccb7631e7d9577bcaa0bbf8528 Mon Sep 17 00:00:00 2001
|
2
|
+
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
3
|
+
Date: Mon, 1 Jul 2013 21:10:10 +0800
|
4
|
+
Subject: [PATCH 04/14] EXSLT function str:replace() is broken as-is
|
5
|
+
|
6
|
+
the str:replace() function is no longer usable without a transform
|
7
|
+
context. I take it from the bug report that it is not supposed to be used
|
8
|
+
from plain XPath but only from XSLT according to the EXSLT specification.
|
9
|
+
|
10
|
+
However, the previous implementation used to work in XPath and is still
|
11
|
+
registered on an xmlXPathContext by the exsltStrXpathCtxtRegister()
|
12
|
+
function. When called from plain XPath, it results in a memory error in
|
13
|
+
line 526 (exsltStrReturnString()) of strings.c because xsltCreateRVT()
|
14
|
+
returns NULL as an error indicator due to a NULL transform context being
|
15
|
+
passed in, which was the return value from xsltXPathGetTransformContext() a
|
16
|
+
bit further up (and the code doesn't validate that).
|
17
|
+
|
18
|
+
Since fixing the function looks impossible, best is to remove it.
|
19
|
+
---
|
20
|
+
libexslt/strings.c | 6 +-----
|
21
|
+
1 file changed, 1 insertion(+), 5 deletions(-)
|
22
|
+
|
23
|
+
diff --git a/libexslt/strings.c b/libexslt/strings.c
|
24
|
+
index 045cc14..c0c7a18 100644
|
25
|
+
--- a/libexslt/strings.c
|
26
|
+
+++ b/libexslt/strings.c
|
27
|
+
@@ -838,11 +838,7 @@ exsltStrXpathCtxtRegister (xmlXPathContextPtr ctxt, const xmlChar *prefix)
|
28
|
+
&& !xmlXPathRegisterFuncNS(ctxt,
|
29
|
+
(const xmlChar *) "concat",
|
30
|
+
(const xmlChar *) EXSLT_STRINGS_NAMESPACE,
|
31
|
+
- exsltStrConcatFunction)
|
32
|
+
- && !xmlXPathRegisterFuncNS(ctxt,
|
33
|
+
- (const xmlChar *) "replace",
|
34
|
+
- (const xmlChar *) EXSLT_STRINGS_NAMESPACE,
|
35
|
+
- exsltStrReplaceFunction)) {
|
36
|
+
+ exsltStrConcatFunction)) {
|
37
|
+
return 0;
|
38
|
+
}
|
39
|
+
return -1;
|
40
|
+
--
|
41
|
+
1.8.4.1
|
42
|
+
|
@@ -0,0 +1,164 @@
|
|
1
|
+
From 515283959aae470a6ee5033deb9f977a489e7578 Mon Sep 17 00:00:00 2001
|
2
|
+
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
3
|
+
Date: Sun, 4 Aug 2013 16:42:51 +0200
|
4
|
+
Subject: [PATCH 06/14] Fix str:padding to work with UTF-8 strings
|
5
|
+
|
6
|
+
Thanks to Tobias Hoffmann for the report.
|
7
|
+
|
8
|
+
Also add some tests.
|
9
|
+
---
|
10
|
+
libexslt/strings.c | 16 +++++++++-------
|
11
|
+
tests/exslt/strings/padding.1.out | 27 ++++++++++++++++++++++++++
|
12
|
+
tests/exslt/strings/padding.1.xml | 10 ++++++++++
|
13
|
+
tests/exslt/strings/padding.1.xsl | 40 +++++++++++++++++++++++++++++++++++++++
|
14
|
+
4 files changed, 86 insertions(+), 7 deletions(-)
|
15
|
+
create mode 100644 tests/exslt/strings/padding.1.out
|
16
|
+
create mode 100644 tests/exslt/strings/padding.1.xml
|
17
|
+
create mode 100644 tests/exslt/strings/padding.1.xsl
|
18
|
+
|
19
|
+
diff --git a/libexslt/strings.c b/libexslt/strings.c
|
20
|
+
index c0c7a18..3c702ad 100644
|
21
|
+
--- a/libexslt/strings.c
|
22
|
+
+++ b/libexslt/strings.c
|
23
|
+
@@ -351,8 +351,8 @@ exsltStrDecodeUriFunction (xmlXPathParserContextPtr ctxt, int nargs) {
|
24
|
+
*/
|
25
|
+
static void
|
26
|
+
exsltStrPaddingFunction (xmlXPathParserContextPtr ctxt, int nargs) {
|
27
|
+
- int number, str_len = 0;
|
28
|
+
- xmlChar *str = NULL, *ret = NULL, *tmp;
|
29
|
+
+ int number, str_len = 0, str_size = 0;
|
30
|
+
+ xmlChar *str = NULL, *ret = NULL;
|
31
|
+
|
32
|
+
if ((nargs < 1) || (nargs > 2)) {
|
33
|
+
xmlXPathSetArityError(ctxt);
|
34
|
+
@@ -362,11 +362,13 @@ exsltStrPaddingFunction (xmlXPathParserContextPtr ctxt, int nargs) {
|
35
|
+
if (nargs == 2) {
|
36
|
+
str = xmlXPathPopString(ctxt);
|
37
|
+
str_len = xmlUTF8Strlen(str);
|
38
|
+
+ str_size = xmlStrlen(str);
|
39
|
+
}
|
40
|
+
if (str_len == 0) {
|
41
|
+
if (str != NULL) xmlFree(str);
|
42
|
+
str = xmlStrdup((const xmlChar *) " ");
|
43
|
+
str_len = 1;
|
44
|
+
+ str_size = 1;
|
45
|
+
}
|
46
|
+
|
47
|
+
number = (int) xmlXPathPopNumber(ctxt);
|
48
|
+
@@ -378,13 +380,13 @@ exsltStrPaddingFunction (xmlXPathParserContextPtr ctxt, int nargs) {
|
49
|
+
}
|
50
|
+
|
51
|
+
while (number >= str_len) {
|
52
|
+
- ret = xmlStrncat(ret, str, str_len);
|
53
|
+
+ ret = xmlStrncat(ret, str, str_size);
|
54
|
+
number -= str_len;
|
55
|
+
}
|
56
|
+
- tmp = xmlUTF8Strndup (str, number);
|
57
|
+
- ret = xmlStrcat(ret, tmp);
|
58
|
+
- if (tmp != NULL)
|
59
|
+
- xmlFree (tmp);
|
60
|
+
+ if (number > 0) {
|
61
|
+
+ str_size = xmlUTF8Strsize(str, number);
|
62
|
+
+ ret = xmlStrncat(ret, str, str_size);
|
63
|
+
+ }
|
64
|
+
|
65
|
+
xmlXPathReturnString(ctxt, ret);
|
66
|
+
|
67
|
+
diff --git a/tests/exslt/strings/padding.1.out b/tests/exslt/strings/padding.1.out
|
68
|
+
new file mode 100644
|
69
|
+
index 0000000..1833a65
|
70
|
+
--- /dev/null
|
71
|
+
+++ b/tests/exslt/strings/padding.1.out
|
72
|
+
@@ -0,0 +1,27 @@
|
73
|
+
+<?xml version="1.0"?>
|
74
|
+
+<test-results>
|
75
|
+
+ <test-result>
|
76
|
+
+ <padding> </padding>
|
77
|
+
+ <length-check>OK</length-check>
|
78
|
+
+ </test-result>
|
79
|
+
+ <test-result>
|
80
|
+
+ <padding>--------</padding>
|
81
|
+
+ <length-check>OK</length-check>
|
82
|
+
+ </test-result>
|
83
|
+
+ <test-result>
|
84
|
+
+ <padding>abcabcabca</padding>
|
85
|
+
+ <length-check>OK</length-check>
|
86
|
+
+ </test-result>
|
87
|
+
+ <test-result>
|
88
|
+
+ <padding>–––––––</padding>
|
89
|
+
+ <length-check>OK</length-check>
|
90
|
+
+ </test-result>
|
91
|
+
+ <test-result>
|
92
|
+
+ <padding>– – – – – –</padding>
|
93
|
+
+ <length-check>OK</length-check>
|
94
|
+
+ </test-result>
|
95
|
+
+ <test-result>
|
96
|
+
+ <padding>ÄÖÜÄÖÜ</padding>
|
97
|
+
+ <length-check>OK</length-check>
|
98
|
+
+ </test-result>
|
99
|
+
+</test-results>
|
100
|
+
diff --git a/tests/exslt/strings/padding.1.xml b/tests/exslt/strings/padding.1.xml
|
101
|
+
new file mode 100644
|
102
|
+
index 0000000..16d0824
|
103
|
+
--- /dev/null
|
104
|
+
+++ b/tests/exslt/strings/padding.1.xml
|
105
|
+
@@ -0,0 +1,10 @@
|
106
|
+
+<?xml version="1.0"?>
|
107
|
+
+<test-cases>
|
108
|
+
+ <test-case length="5"/>
|
109
|
+
+ <test-case length="8">-</test-case>
|
110
|
+
+ <test-case length="10">abc</test-case>
|
111
|
+
+ <test-case length="7">–</test-case>
|
112
|
+
+ <test-case length="11">– </test-case>
|
113
|
+
+ <test-case length="6">ÄÖÜ</test-case>
|
114
|
+
+</test-cases>
|
115
|
+
+
|
116
|
+
diff --git a/tests/exslt/strings/padding.1.xsl b/tests/exslt/strings/padding.1.xsl
|
117
|
+
new file mode 100644
|
118
|
+
index 0000000..c5d621d
|
119
|
+
--- /dev/null
|
120
|
+
+++ b/tests/exslt/strings/padding.1.xsl
|
121
|
+
@@ -0,0 +1,40 @@
|
122
|
+
+<?xml version="1.0"?>
|
123
|
+
+<xsl:stylesheet version="1.0"
|
124
|
+
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
125
|
+
+ xmlns:str="http://exslt.org/strings"
|
126
|
+
+ exclude-result-prefixes="str">
|
127
|
+
+
|
128
|
+
+<xsl:output indent="yes"/>
|
129
|
+
+
|
130
|
+
+<xsl:template match="test-cases">
|
131
|
+
+ <test-results>
|
132
|
+
+ <xsl:apply-templates select="test-case"/>
|
133
|
+
+ </test-results>
|
134
|
+
+</xsl:template>
|
135
|
+
+
|
136
|
+
+<xsl:template match="test-case">
|
137
|
+
+ <test-result>
|
138
|
+
+ <xsl:variable name="padding">
|
139
|
+
+ <xsl:choose>
|
140
|
+
+ <xsl:when test="string(.)">
|
141
|
+
+ <xsl:value-of select="str:padding(@length, .)"/>
|
142
|
+
+ </xsl:when>
|
143
|
+
+ <xsl:otherwise>
|
144
|
+
+ <xsl:value-of select="str:padding(@length)"/>
|
145
|
+
+ </xsl:otherwise>
|
146
|
+
+ </xsl:choose>
|
147
|
+
+ </xsl:variable>
|
148
|
+
+ <padding>
|
149
|
+
+ <xsl:value-of select="$padding"/>
|
150
|
+
+ </padding>
|
151
|
+
+ <length-check>
|
152
|
+
+ <xsl:choose>
|
153
|
+
+ <xsl:when test="string-length($padding) = @length">OK</xsl:when>
|
154
|
+
+ <xsl:otherwise>FAIL</xsl:otherwise>
|
155
|
+
+ </xsl:choose>
|
156
|
+
+ </length-check>
|
157
|
+
+ </test-result>
|
158
|
+
+</xsl:template>
|
159
|
+
+
|
160
|
+
+</xsl:stylesheet>
|
161
|
+
+
|
162
|
+
--
|
163
|
+
1.8.4.1
|
164
|
+
|