History log of /php-src/ext/xmlreader/php_xmlreader.c (Results 1 – 25 of 154)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# b3700e29 20-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Simplify prop handler of XMLReader (#14023)

As XMLReader only exposes a single class, and the property handlers are
statically set, we don't need to store the pointer to the property

Simplify prop handler of XMLReader (#14023)

As XMLReader only exposes a single class, and the property handlers are
statically set, we don't need to store the pointer to the property
handler table inside the object.
This simplifies the code and reduces the memory required for XMLReader.

show more ...


# 63bb04e5 09-Mar-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Simplify DOM_RET_OBJ macro


# 6d721b21 25-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Use string literal equality helper function in xmlreader_get_method


# da1a9402 25-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Set xmlreader property handler hash size to a precalculated value


# 7f080d35 25-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Don't put xmlreader prop handler data on the heap


# 06a89a91 25-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Make readonly error message consistent


# b68b55be 25-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Remove unused write_func in php_xmlreader.c


# 586adf96 25-Feb-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Remove unimplemented, unreferenced function from php_xmlreader.c


# 900f0cab 24-Oct-2023 icy17 <1061499390@qq.com>

Fix null pointer dereferences in case of allocation failure

Closes GH-12506.


# c283c3ab 15-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Sanitize libxml2 globals before parsing

Fixes GHSA-3qrf-m4j2-pcrr.

To parse a document with libxml2, you first need to create a parsing context.
The parsing context contains par

Sanitize libxml2 globals before parsing

Fixes GHSA-3qrf-m4j2-pcrr.

To parse a document with libxml2, you first need to create a parsing context.
The parsing context contains parsing options (e.g. XML_NOENT to substitute
entities) that the application (in this case PHP) can set.
Unfortunately, libxml2 also supports providing default set options.
For example, if you call xmlSubstituteEntitiesDefault(1) then the XML_NOENT
option will be added to the parsing options every time you create a parsing
context **even if the application never requested XML_NOENT**.

Third party extensions can override these globals, in particular the
substitute entity global. This causes entity substitution to be
unexpectedly active.

Fix it by setting the parsing options to a sane known value.
For API calls that depend on global state we introduce
PHP_LIBXML_SANITIZE_GLOBALS() and PHP_LIBXML_RESTORE_GLOBALS().
For other APIs that work directly with a context we introduce
php_libxml_sanitize_parse_ctxt_options().

show more ...


# cad47be8 30-Jun-2023 Bob Weinand

Fix GH-11548 (Argument corruption when calling XMLReader::open or XMLReader::XML non-statically with observer active)


# ec10b28d 27-Jan-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix array overrun when appending slash to paths

Fix it by extending the array sizes by one character. As the input is
limited to the maximum path length, there will always be place to ap

Fix array overrun when appending slash to paths

Fix it by extending the array sizes by one character. As the input is
limited to the maximum path length, there will always be place to append
the slash. As the php_check_specific_open_basedir() simply uses the
strings to compare against each other, no new failures related to too
long paths are introduced.
We'll let the DOM and XML case handle a potentially too long path in the
library code.

show more ...


# a01dd9fe 14-Sep-2022 Bob Weinand

Revert "Port all internally used classes to use default_object_handlers"

This reverts commit 94ee4f9834743ca74f6c9653863273277ce6c61a.

The commit was a bit too late to be included i

Revert "Port all internally used classes to use default_object_handlers"

This reverts commit 94ee4f9834743ca74f6c9653863273277ce6c61a.

The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.

show more ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23
# 94ee4f98 24-Aug-2022 Bob Weinand

Port all internally used classes to use default_object_handlers

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>


Revision tags: php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22
# 60cae26b 26-Jul-2022 Máté Kocsis

Declare ext/xmlreader constants in stubs (#9133)

Revision tags: php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4
# c5e030f3 12-Oct-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix bug #81521


# 53f89219 12-Oct-2021 Nikita Popov

Fix bug #81521

The current error message is incorrect -- the problem here is not
that the property is invalid, but that these methods are unusable
prior to loading data, same as read

Fix bug #81521

The current error message is incorrect -- the problem here is not
that the property is invalid, but that these methods are unusable
prior to loading data, same as read().

show more ...

Revision tags: php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

Revision tags: php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1
# 9d2a466c 09-Jun-2021 Nikita Popov

Remove explicit assignments of zend_objects_destroy_object

This is the default handler, no need to set it explicitly. This
makes it easier to see which objects really have a custom dtor_

Remove explicit assignments of zend_objects_destroy_object

This is the default handler, no need to set it explicitly. This
makes it easier to see which objects really have a custom dtor_obj.

show more ...

Revision tags: php-8.1.0alpha1, php-8.0.7, php-7.4.20
# 940f599b 25-May-2021 Nikita Popov

Convert check into assertion in ext/xmlreader

$this is requires to be instanceof self for quite a while now,
so make this an assertion.

# 3c96d7e6 25-May-2021 Nikita Popov

Remove some unnecessary null pointer checks in ext/xmlreader

intern cannot be NULL.

Revision tags: php-8.0.7RC1, php-7.4.20RC1
# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-8.0.6, php-7.4.19
# 768e8b83 03-May-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #73246: XMLReader: encoding length not checked


# 645815c5 03-May-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #73246: XMLReader: encoding length not checked


Revision tags: php-7.4.18, php-7.3.28, php-8.0.5
# 272df442 22-Apr-2021 Christoph M. Becker

Fix #73246: XMLReader: encoding length not checked

libxml2 expects the passed encoding to be NUL terminated, so we reject
strings with NUL bytes right away.

Closes GH-6899.

1234567