Christoph M. Becker
de354683a0
Make bug49278.phpt more resilient
...
Due to the hard-coded PHP version, that test easily fails[1], so we
relax the test expectations.
[1] e.g. <https://github.com/cmb69/php-ftw/actions/runs/9784934000/job/27016894692#step:5:66 >
Closes GH-14817.
2024-07-04 16:03:15 +02:00
Niels Dossche
ef80266d99
Fix double entity encoding in soap
2024-07-03 10:34:46 -07:00
Niels Dossche
173a4033a1
Fix tests for libxml2 2.13.2
2024-07-03 10:34:46 -07:00
Niels Dossche
85705eda71
Fix compilation on libxml2 2.13
2024-07-03 10:34:46 -07:00
Peter Kokot
bee84c0468
Autotools: Quote PHP_SUBST arguments in extensions ( #14748 )
2024-07-02 06:56:18 +02:00
Gina Peter Banyard
5b1b3ae673
ext/soap: Initialize a HashTable of size j
...
The i seems to be a mistake as everything else uses j
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
ee75f344f8
ext/soap: Add const qualifiers for serialize functions
...
As serializing something should not affect the value of it
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
ca2b131c6e
ext/soap: mark string param of sdl_serialize_key() as const
...
Add const qualifiers to the variables at the call size
Rename variables when they were shadowing a variable from the outer scope
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
325f8f0cfc
ext/soap: Remove cast from macro
...
Move it to the one call site that requires it
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
0e91b4f5e6
ext/soap: convert int type to size_t where appropriate
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
902c8ceab0
ext/soap: Rename MD5 context variable to not shadow the stream context variable
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
26143dae2d
ext/soap: Remove unused 'cache' extension global
2024-06-27 17:41:23 +01:00
Arnaud Le Blanc
11accb5cdf
Preferably include from build dir ( #13516 )
...
* Include from build dir first
This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.
Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :
-I$(top_builddir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/main
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM
-I$(top_builddir)/
As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.
After this change, the include path is defined as follows:
-I$(top_builddir)/main
-I$(top_builddir)
-I$(top_srcdir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM
* Fix extension include path for out of tree builds
* Include config.h with the brackets form
`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.
Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.
2024-06-26 00:26:43 +02:00
Gina Peter Banyard
7a1eded24d
ext/soap: Use zend_string for name parameter of set_soap_fault()
2024-06-19 02:23:08 +01:00
Gina Peter Banyard
e1b59e9edd
ext/soap: Use more accurate return types in implementations of SoapClient::__doRequest()
...
The do_request() function that calls this methods, assumes that a string is being returned from the method
otherwise it bails out.
However, the default implementation of SoapClient::__doRequest() indicates that it can return null when it
fails to set-up and execute the HTTP SOAP request, but this always results in a SoapFault exception being
thrown, and thus cannot happen in practice.
We need to investigate further if the return type should be changed from ?string to string or not.
2024-06-19 02:23:08 +01:00
Gina Peter Banyard
0fc5ec108e
ext/soap: Add tests for invalid SOAP Headers argument
2024-06-19 02:23:08 +01:00
Gina Peter Banyard
cd61f16ad8
ext/soap: Refactor verify_soap_headers_array()
...
Make its duty only to check if the provided HashTable is valid
2024-06-19 02:23:08 +01:00
Gina Peter Banyard
e12db87e09
ext/soap: Add some SoapServer tests about handling errors
2024-06-19 02:23:01 +01:00
Gina Peter Banyard
e830306431
ext/soap: Add some SoapClient tests about handling errors
2024-06-19 02:20:37 +01:00
Gina Peter Banyard
062353ce2d
ext/soap: prevent needless computation of strlen()
2024-06-19 02:20:36 +01:00
Gina Peter Banyard
073491bfd8
ext/soap: Refactor SOAP call methods implementation
2024-06-19 02:20:36 +01:00
Gina Peter Banyard
a6a2c66141
ext/soap: Refactor SDL delete functions
...
Use a common implementation for persistent and non-persistent functions
2024-06-19 02:20:36 +01:00
Gina Peter Banyard
1e7134f07f
ext/soap: Refactor implementation of in_domain()
2024-06-19 02:20:36 +01:00
Gina Peter Banyard
4626c17f41
ext/soap: SoapServer::addSoapHeader() does not need bailout handler wrapper
...
As this methods never uses the bailout mechanism
2024-06-19 02:20:36 +01:00
Gina Peter Banyard
2459b3ae0d
ext/soap: SoapServer::addFunction() does not need bailout handler wrapper
...
As this methods never uses the bailout mechanism
2024-06-19 02:20:36 +01:00
Gina Peter Banyard
ce1bb1afa8
ext/soap: SoapServer::getFunctions() does not need bailout handler wrapper
...
As this methods never uses the bailout mechanism
2024-06-19 02:20:35 +01:00
Gina Peter Banyard
a99a790ad0
ext/soap: SoapServer::setObject() does not need bailout handler wrapper
...
As this methods never uses the bailout mechanism
2024-06-19 02:20:35 +01:00
Gina Peter Banyard
5a961cbf77
ext/soap: SoapServer::setClass() does not need bailout handler wrapper
...
As this methods never uses the bailout mechanism
2024-06-19 02:20:35 +01:00
Gina Peter Banyard
8269caab53
ext/soap: SoapServer::setPersistence() does not need bailout handler wrapper
...
As this methods never uses the bailout mechanism
2024-06-19 02:20:35 +01:00
Gina Peter Banyard
572b2b71cd
ext/soap: Use bool type for _bailout variable
2024-06-19 02:20:35 +01:00
Gina Peter Banyard
b71951baae
ext/soap: Use bool as return type instead of int for do_request()
2024-06-19 02:20:35 +01:00
Gina Peter Banyard
cfc48bd832
ext/soap: Use bool as return type instead of int for parse_packet_soap()
2024-06-19 02:20:34 +01:00
Gina Peter Banyard
a7c7158653
ext/soap: Use bool as return type instead of int for is_blank()
2024-06-19 02:20:34 +01:00
Gina Peter Banyard
a888c4f0ff
Merge branch 'PHP-8.3'
...
* PHP-8.3:
ext/soap: Fix memory leaks when calling SoapFault::__construct() twice
2024-06-16 23:01:52 +01:00
Gina Peter Banyard
e9b36438ed
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
ext/soap: Fix memory leaks when calling SoapFault::__construct() twice
2024-06-16 23:01:36 +01:00
Gina Peter Banyard
df219ccf9d
ext/soap: Fix memory leaks when calling SoapFault::__construct() twice
2024-06-16 23:00:59 +01:00
Gina Peter Banyard
fd2d869642
Clean-up some more headers ( #14416 )
...
Remove unused headers (such as php_ini.h for extensions that don't define INI settings)
Use more specific headers when possible
2024-06-08 17:15:36 +01:00
Niels Dossche
ffe225d686
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix bug #76232 : SoapClient Cookie Header Semicolon
2024-06-01 17:38:06 +02:00
Niels Dossche
98c8518b39
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix bug #76232 : SoapClient Cookie Header Semicolon
2024-06-01 17:38:00 +02:00
Niels Dossche
1b1677a8f1
Fix bug #76232 : SoapClient Cookie Header Semicolon
...
According to RFC 6265 [1] the cookies must be separated by "; " not ";",
and it must not end with ";".
[1] https://datatracker.ietf.org/doc/html/rfc6265
Closes GH-14406.
2024-06-01 17:37:30 +02:00
Peter Kokot
cf469133a5
Fix ZEND_DEBUG condition ( #14408 )
...
ZEND_DEBUG is always defined by the build system automatically, either
to value 0 or value 1.
2024-06-01 16:07:48 +02:00
Niels Dossche
9f89ada76f
Struct-pack some soap datatypes ( #14403 )
...
While keeping data that belongs together close too.
2024-06-01 14:11:45 +02:00
Niels Dossche
61191dc313
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix bug #69280 : SoapClient classmap doesn't support fully qualified class name (#14398 )
2024-06-01 13:32:58 +02:00
Niels Dossche
d11a3c6579
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix bug #69280 : SoapClient classmap doesn't support fully qualified class name (#14398 )
2024-06-01 13:31:02 +02:00
Niels Dossche
476706165a
Fix bug #69280 : SoapClient classmap doesn't support fully qualified class name ( #14398 )
...
There's a hash table that maps type names to class name, but names with
a leading backslash are not supported. The engine has logic to strip
away the leading backslash that we should replicate here.
It works by checking if we need to make an actual copy in case an
unexpected (e.g. invalid data or leading backslash) situations are
detected. Upon making a copy we normalize the data in the table.
Furthermore, previously the code assumed that the key was always valid
and that the structure was a non-packed hash table. This isn't
necessarily the case. The new code fixes this as well.
Closes GH-14398.
2024-06-01 13:29:26 +02:00
Niels Dossche
37f683a70f
Remove unused internal functions in soap
2024-05-31 23:05:33 +02:00
Niels Dossche
e8c6c6f15d
Fix signedness issues in soap.c
2024-05-31 23:05:33 +02:00
Niels Dossche
ca7a0df35e
Make some things const that can be const in soap
2024-05-31 23:05:33 +02:00
Niels Dossche
7834bd1a59
Fix parameter name warning
2024-05-31 23:05:33 +02:00
Niels Dossche
62cdaac280
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix memory leaks with string function name lookups
2024-05-31 21:23:20 +02:00