1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-13 20:58:16 +03:00

4335 Commits

Author SHA1 Message Date
Alexandre Rostovtsev
6c9c611bee python: fix drv_libxml2.py for python3 compatibility
https://bugzilla.gnome.org/show_bug.cgi?id=703979
2013-07-11 15:16:02 +08:00
Ami Fischman
33a25af71f missing else in xlink.c
Obviously forgotten
2013-07-02 09:47:26 +08:00
Armin K
6eea2f2c60 python: Fix compiler warnings when building python3 bindings 2013-06-03 22:03:28 +02:00
Daniel Veillard
dcc1950319 Fix a parsing bug on non-ascii element and CR/LF usage
https://bugzilla.gnome.org/show_bug.cgi?id=698550

Somehow the behaviour of the internal parser routine changed
slightly when encountering CR/LF, which led to a bug when
parsing document with non-ascii Names
2013-05-22 22:56:45 +02:00
Daniel Veillard
e38217ae82 Forgot to document 2.9.1 release, regenerate docs 2013-05-10 15:40:13 +08:00
Daniel Veillard
63588f476f Fix a regression in xmlGetDocCompressMode()
The switch to xzlib had for consequence that the compression
level of the input was not gathered anymore in ctxt->input->buf,
then the parser compression flags was left to -1 and propagated
to the resulting document.
Fix the I/O layer to get compression detection in xzlib,
then carry it in the input buffer and the resulting document

  This should fix
    https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3456
2013-05-10 14:01:46 +08:00
Aleksey Sanin
1ba80b7b6f properly quote the namespace uris written out during c14n 2013-05-09 16:02:16 +00:00
Daniel Veillard
a75a009d12 xmllint --memory should fail on empty files
Exposed by https://bugzilla.gnome.org/show_bug.cgi?id=699896
when doing analysis but a priori unrelated.
2013-05-08 13:45:48 +08:00
Alexey Neyman
0b86537dfa Remove premature XInclude check on URI being relative
As it gives false negatives, see
  https://mail.gnome.org/archives/xml/2013-April/msg00023.html
2013-05-06 10:20:18 +08:00
Nikolay Sivov
d4a5d98139 Cast encoding name to char pointer to match arg type 2013-05-06 09:00:56 +08:00
Petr Sumbera
722923bc9b Fix for compilation with python 2.6.8
Remap PyCapsule to PyCObject based on the macro being available
instead of using the python version
2013-05-03 22:25:38 +08:00
dcb
10ec19ab0a Fix missing break on last() function for attributes
pointed out by cppcheck
2013-05-02 16:11:46 +08:00
Romain Bondue
960f0e2756 Do not URI escape in server side includes 2013-04-23 20:44:55 +08:00
Alexander Pastukhov
704d8c5e9a Fix an error in xmlCleanupParser
https://bugzilla.gnome.org/show_bug.cgi?id=698582

xmlCleanupParser calls xmlCleanupGlobals() and then
xmlResetLastError() but the later reallocate the global
data freed by previous call. Just swap the two calls.
2013-04-23 13:02:11 +08:00
Daniel Veillard
f4e5a6994e Release of libxml2-2.9.1
* configure.in: bumped version
* doc/*: updated the symbols file and regenerated
v2.9.1
2013-04-19 15:36:36 +08:00
Daniel Veillard
c0a8dd14f8 Fix a linking error for python bindings
Showing up apparently in Debian BTS distro
https://bugzilla.gnome.org/show_bug.cgi?id=685515
2013-04-19 15:02:33 +08:00
Jüri Aedla
9ca816b3a6 Fix a couple of return without value
Error introduced in previous commit !
2013-04-16 22:00:13 +08:00
Daniel Franke
b123711189 Improve the hashing functions 2013-04-12 18:53:53 +08:00
Daniel Veillard
e50ba8164e Improve handling of xmlStopParser()
Add a specific parser error
Try to stop parsing as quickly as possible
CVE-2013-2877
2013-04-11 15:54:51 +08:00
Daniel Veillard
5fe9e9ed1c Remove risk of lockup in dictionary initialization
Reported by Petr Sumbera <petr.sumbera@oracle.com>
Two threads entering xmlInitializeDict concurently could lead
to a lockup due to multiple initializations of the lock used.
To avoid this problem move this to a new private function
called from xmlOnceInit() and deprecate the old initalizer.
Since threaded programs must call xmlInitParser() and this
will lead to dereference of private data and the call to
xmlOnceInit() guaranteed to be unique this should be safe now.
2013-04-05 23:10:41 +08:00
Daniel Veillard
bf4a8f0ea8 Fix python bindings with versions older than 2.7
Need fixing on the Capsule usage, the lack of PyBytes,
lack of io module and the way to access exception details.
2013-04-02 10:27:57 +08:00
Roumen Petrov
4d7a32959b rebuild docs:Makefile.am 2013-04-01 16:53:27 +08:00
Roumen Petrov
95850fcd75 elfgcchack.h after rebuild in doc 2013-04-01 16:52:42 +08:00
Roumen Petrov
2ff9284325 elfgcchack for buf module 2013-04-01 16:48:44 +08:00
Daniel Veillard
54ae471c14 Regenerated API, and testapi, rebuild documentation
After the previous commit adding 2 new entry points
2013-04-01 16:42:12 +08:00
Alex Bligh
28876afb4e Add xmlXPathSetContextNode and xmlXPathNodeEval
This patch adds xmlXPathSetContextNode and xmlXPathNodeEval,
which make it easier to evaluation XPath expressions with a
context node other than the document root without poking about
inside the internals of the context.

This patch is compile-tested only, and is my first libxml2
contribution, so please go easy.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
2013-04-01 16:42:12 +08:00
Daniel Veillard
87f3287d9b Fix tree iterators broken by 2to3 script 2013-04-01 13:33:42 +08:00
Daniel Veillard
2cb6bf8eb0 update all tests for Python3 and Python2 2013-03-30 22:33:06 +08:00
Daniel Veillard
6f18465189 A few more fixes for python 3 affecting libxml2.py
need a few changes to the generator and the libxml.py stub
2013-03-30 22:33:06 +08:00
Daniel Veillard
3798c4adbb Fix compilation on Python3
while still compiling on recent Python2:
  - change the handling of files, tweak the generator, get the fd
    instead of the FILE *, dup it and fdopen based on mode, add a
    Release function on Python3 and call to flush from the generated
    python stubs
  - switch to using Capsules instead of CObjects
  - fix PyString to PyBytes
  - fix PyInt to PyLong
  - tweak the module registration to compile on both versions
  - drop PyInstance check for passed xmlNodes and instead check
    attributes presence

Daniel
2013-03-30 22:33:06 +08:00
Daniel Veillard
d8a75bffa4 Converting apibuild.py to python3
not finished ....
2013-03-30 22:33:06 +08:00
Daniel Veillard
3cb1ae26ec First pass at starting porting to python3 2013-03-30 22:33:06 +08:00
Daniel Veillard
a5e513a552 Fix a uneeded and wrong extra link parameter 2013-03-30 22:33:06 +08:00
Daniel Veillard
b8e3f80da7 updated configure.in for python3 2013-03-30 22:33:05 +08:00
Daniel Veillard
0ab8ce5302 Switched comment in file to UTF-8 encoding 2013-03-30 22:33:05 +08:00
Daniel Veillard
215a729645 Extend gitignore 2013-03-30 22:33:05 +08:00
Shaun McCance
519bc6a3ab Add support for xpathRegisterVariable in Python 2013-03-27 15:55:36 +08:00
Daniel Veillard
483272f3f0 Added a regression tests from bug 694228 data
Provided by Mark Rowe <mrowe@apple.com>
2013-03-27 13:37:14 +08:00
Daniel Veillard
ab0e35044c Activate detection of encoding in external subset
https://bugzilla.gnome.org/show_bug.cgi?id=694228

the ctxt->encoding was percolated down when parsing the external
subset leading to failures
2013-03-27 13:21:38 +08:00
Daniel Veillard
113384f126 Add documentation for xmllint --xpath
https://bugzilla.gnome.org/show_bug.cgi?id=694822

this wasn't documented in the man page, and there was a typo in
xmllint help output.
2013-03-27 11:43:41 +08:00
Mikhail Titov
8e2098aef7 Fix an output buffer flushing conversion bug
for https://bugzilla.gnome.org/show_bug.cgi?id=694982
On a flush operation, everything must be converted
2013-03-27 11:00:31 +08:00
Denis Pauk
e1631e1cfc Few cleanup patches for Windows
https://bugzilla.gnome.org/show_bug.cgi?id=690878
provided by Cole <coleharrisjohnson@gmail.com>
2013-03-27 09:55:14 +08:00
Daniel Veillard
f7aeda24f6 Fix the URL of the SAX docuemntation from James
as it has moved
2013-03-23 10:31:26 +08:00
Csaba László
1f6c42cffd Fix an old bug in xmlSchemaValidateOneElement
Recently I have run into the very same problem Tiberius Duluman did back in
Wed, 13 May 2009 15:56:55 +0300 ([xml] Bug in xmlSchemaValidateOneElement
function). Now I can proof now that his problem is a valid problem. I checked
the latest available version of xmlschemas.c (2.9.0.) and the problem is still
there!
I think I have found a solution to the problem which I'd like proof with you:
My quick solution to the problem is to replace line 27849 in
xmlschemas.c
(v2.9.0.) in function xmlSchemaVDocWalk
    valRoot = xmlDocGetRootElement(vctxt->doc);
with this one:
    valRoot = vctxt->validationRoot ? vctxt->validationRoot : xmlDocGetRootElement(vctxt->doc);
Currently I'm using version 2.7.8. in Windows and this change seems to solve
the problem.
2013-03-18 15:30:00 +08:00
Daniel Veillard
cff2546f13 Cache presence of '<' in entities content
slightly modify how ent->checked is used, and use the lowest bit to
keep the information
2013-03-11 15:59:22 +08:00
Daniel Veillard
a3f1e3e571 Avoid extra processing on entities
If an entity has already been checked for correctness no
need to check it on every reference
2013-03-11 15:59:21 +08:00
Gilles Espinasse
a09890684c Fix configure cannot remove messages
this is the other way to solve ./configure cannot remove messages by
simply removing rm detection in configure.in

There is already a raw 'rm -f' at the end on configure.in
2013-03-04 22:46:21 +08:00
Daniel Veillard
c100e69c4b fix schema validation in combination with xsi:nil
Based on Thomas Gamper <icicle@cg.tuwien.ac.at> findings and
initial patch

There is no point doing a regexp validation of further
content if there actually is no further content because the
element is nilled.
2013-02-28 19:02:32 +08:00
Steve Wolf
19d785b5c7 xmlCtxtReadFile doesn't work with literal IPv6 URLs
https://bugzilla.gnome.org/show_bug.cgi?id=694185

RedHat Bug 624626 discusses the new behavior of libxml regarding brackets
around IPv6 addresses.  In earlier versions such as 2.6.27, uri.c stripped the
brackets (e.g. uri->server == "fdf2:1e39:73d1:934e::119"); in the current
version it returns IPv6 addresses with brackets intact (e.g. uri->server
== "[fdf2:1e39:73d1:934e::119]").

Thus in 2.9.0, xmlCtxtReadFile() has a problem when it is passed a URL
containing a literal IPv6 address.  xmlCtxReadFile() and its subroutines pass
uri->server unchanged to getaddrinfo(), which doesn't recognize a bracketed
IPv6 address, so the read fails.

This strips the [ and ] from IPv6 addresses allowing getaddrinfo()
to work properly with such URIs.
2013-02-28 18:22:46 +08:00
Alexey Neyman
d749528aa9 Silent the new python test on input
Just make it silent if there is no error
2013-02-27 13:11:47 +08:00