#
9cb23a3d |
| 30-Aug-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-15654: Signed integer overflow in ext/dom/nodelist.c There's implicit truncation casts from zend_long to int which cause issues because checks are done against the zend_longs. Sin
Fix GH-15654: Signed integer overflow in ext/dom/nodelist.c There's implicit truncation casts from zend_long to int which cause issues because checks are done against the zend_longs. Since the iterator infrastructure uses zend_longs, just convert everything to zend_long. Closes GH-15669.
show more ...
|
#
461d890f |
| 30-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Merge branch 'PHP-8.2' into PHP-8.3 * PHP-8.2: Fix crash when calling childNodes next() when iterator is exhausted Fix references not handled correctly in C14N Fix crashes
Merge branch 'PHP-8.2' into PHP-8.3 * PHP-8.2: Fix crash when calling childNodes next() when iterator is exhausted Fix references not handled correctly in C14N Fix crashes when entity declaration is removed while still having entity references
show more ...
|
#
e878b9f3 |
| 30-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix crashes when entity declaration is removed while still having entity references libxml doesn't do reference counting inside its node types. It's possible to remove an entity declarat
Fix crashes when entity declaration is removed while still having entity references libxml doesn't do reference counting inside its node types. It's possible to remove an entity declaration out of the document, but then entity references will keep pointing to that stale declaration. This will cause crashes. One idea would be to check when a declaration is removed, to trigger a hook that updates all references. However this means we have to keep track of all references somehow, which would be a high-overhead solution. The solution in this patch makes sure that the fields are always updated before they are read. Closes GH-14089.
show more ...
|
#
c5a63a90 |
| 26-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Merge branch 'PHP-8.2' into PHP-8.3 * PHP-8.2: Fix reference access in dimensions for DOMNodeList and DOMNodeMap
|
#
b8a1041f |
| 25-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix reference access in dimensions for DOMNodeList and DOMNodeMap Closes GH-13511. |
#
e658f805 |
| 06-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-12870: Creating an xmlns attribute results in a DOMException There were multiple things here since forever, see the GH thread [1] for discussion. There were already many
Fix GH-12870: Creating an xmlns attribute results in a DOMException There were multiple things here since forever, see the GH thread [1] for discussion. There were already many fixes to this function previously, and as a consequence of one of those fixes this started throwing exceptions for a correct use-case. It turns out that even when reverting to the previous behaviour there are still bugs. Just fix all of them while we have the chance. [1] https://github.com/php/php-src/issues/12870 Closes GH-12888.
show more ...
|
#
6a2b8851 |
| 27-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Merge branch 'PHP-8.2' into PHP-8.3 * PHP-8.2: Restore old namespace reconciliation behaviour
|
#
19886d3a |
| 27-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Restore old namespace reconciliation behaviour
|
#
e127f871 |
| 27-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Restore old namespace reconciliation behaviour The xmlDOMWrapReconcileNamespaces method we used to fix the namespace corruption issues in 8.1.21/8.2.8 caused regressions. Primarily,
Restore old namespace reconciliation behaviour The xmlDOMWrapReconcileNamespaces method we used to fix the namespace corruption issues in 8.1.21/8.2.8 caused regressions. Primarily, there is a similar corruption that the xmlReconciliateNs method used to have in which a namespace is suddenly shifted (SAML-Toolkits/php-saml#562) and the side-effect of removing redundant namespaces causes problems when a specific serialization is required. Closes GH-12308.
show more ...
|
#
d46dc569 |
| 23-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix various namespace prefix conflict resolution bugs and namespace shift bugs There are two linked issues: - Conflicts couldn't be resolved by changing the prefix name. - Lacki
Fix various namespace prefix conflict resolution bugs and namespace shift bugs There are two linked issues: - Conflicts couldn't be resolved by changing the prefix name. - Lacking a prefix would shift the namespace as the default namespace, causing elements to suddenly become part of the namespace instead of the attributes. The output could still be improved by removing redundant namespace declarations, but that's another issue. At least the output is correct now. Closes GH-11777.
show more ...
|
#
bb092ab4 |
| 06-Aug-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix #80927: Removing documentElement after creating attribute node: possible use-after-free Closes GH-11892. |
#
d04f48b6 |
| 11-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement DOMNode::parentElement and DOMNameSpaceNode::parentElement ref: https://dom.spec.whatwg.org/#parent-element Closes GH-11679. |
#
d38cc9b9 |
| 11-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement DOMNode::isConnected and DOMNameSpaceNode::isConnected ref: https://dom.spec.whatwg.org/#dom-node-isconnected Closes GH-11677. |
#
72e2e250 |
| 13-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement DOMElement::id ref: https://dom.spec.whatwg.org/#dom-element-id Closes GH-11701. |
#
b24b3510 |
| 12-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement DOMElement::className ref: https://dom.spec.whatwg.org/#dom-element-classname Closes GH-11691. |
#
003ebdd0 |
| 02-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-9628: Implicitly removing nodes from \DOMDocument breaks existing references Change the way lifetime works in ext/libxml and ext/dom Previously, a node could be freed even wh
Fix GH-9628: Implicitly removing nodes from \DOMDocument breaks existing references Change the way lifetime works in ext/libxml and ext/dom Previously, a node could be freed even when holding a userland reference to it. This resulted in exceptions when trying to access that node after it has been implicitly or explicitly removed. After this patch, a node will only be freed when the last userland reference disappears. Fixes GH-9628. Closes GH-11576.
show more ...
|
#
45c93c17 |
| 02-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove always-false check There are no prop handlers with a NULL key. |
#
941a7e59 |
| 26-Jun-2023 |
nielsdos <7771979+nielsdos@users.noreply.github.com> |
Avoid allocation when getting the node content, if possible Closes GH-11543. |
#
21c1fb6a |
| 27-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Two tiny ext/dom cleanups (#11541) * Remove obsolete workaround code This code was for libxml2 <= 2.6.14. PHP requires at least libxml2 2.9.0. * Use an inline check ins
Two tiny ext/dom cleanups (#11541) * Remove obsolete workaround code This code was for libxml2 <= 2.6.14. PHP requires at least libxml2 2.9.0. * Use an inline check instead of calling into the library for an empty string check
show more ...
|
#
961e57eb |
| 25-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-11500: Namespace reuse in createElementNS() generates wrong output When you construct a DOM tree containing subtrees which are constructed top-down, this won't remove the redundan
Fix GH-11500: Namespace reuse in createElementNS() generates wrong output When you construct a DOM tree containing subtrees which are constructed top-down, this won't remove the redundant namespaces. That's because the following conditions hold: 1) The namespace are reused from the doc->oldNs list. 2) Therefore during reconciliation no nsDef field is set, so no redundant namespaces are removed by our reconciliation code. Furthermore, it would only be fixed up automatically if the tree wasn't added in bottom-up way, or if it had been constructed bottom-up from the start. Fix it by setting a flag to remove redundant namespaces in the libxml2 reconciliation call. Since removing redundant namespaces may have a performance cost, we only do this after performing a simple check. Closes GH-11528.
show more ...
|
#
12e46288 |
| 19-Jun-2023 |
nielsdos <7771979+nielsdos@users.noreply.github.com> |
Merge branch 'PHP-8.2' * PHP-8.2: Fix GH-11455: Segmentation fault with custom object date properties Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declar
Merge branch 'PHP-8.2' * PHP-8.2: Fix GH-11455: Segmentation fault with custom object date properties Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM"
show more ...
|
#
de022311 |
| 19-Jun-2023 |
nielsdos <7771979+nielsdos@users.noreply.github.com> |
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representati
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM"
show more ...
|
#
c174ebfc |
| 19-Jun-2023 |
nielsdos <7771979+nielsdos@users.noreply.github.com> |
Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM" This reverts commit 7eb3e9cd173fbdd39e
Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM" This reverts commit 7eb3e9cd173fbdd39eefa791aab610858e76399d. Although the fix follows the spec, it causes issues because a lot of old code assumes the incorrect behaviour PHP had since a long time. We cannot do this yet, especially not in a stable release. We revert this for the time being. See GH-11428.
show more ...
|
#
a37ad648 |
| 18-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Merge branch 'PHP-8.2' * PHP-8.2: Fix #80332: Completely broken array access functionality with DOMNamedNodeMap
|
#
862487e9 |
| 18-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Fix #80332: Completely broken array access functionality with DOMNamedNodeMap
|