Commit Graph

1343 Commits

Author SHA1 Message Date
Christoph M. Becker
dd227f61df
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #69668: SOAP special XML characters in namespace URIs not encoded

Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-03-29 14:19:39 +02:00
Christoph M. Becker
75cb678206
Fix #69668: SOAP special XML characters in namespace URIs not encoded
`xmlNewNs()` does not XML encode the passed `href`, so we need to do
that manually.

Closes GH-6804.

Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-03-29 14:17:55 +02:00
Nikita Popov
ce7935e82a Don't pass null action to __doRequest
The parameter is not nullable, so it will be interpreted as
an empty string anyway.

The entire code here is pretty confusing though, and probably
deserves a second loop. The HTTP code only send SOAPAction/action
if soapaction is non-NULL -- but it always is, because it is
accepted through a non-nullable string parameter.

Regarding the SOAPAction header, it appears that always sending
it is actually a requirement of the standard:
> An HTTP client MUST use this header field when issuing a SOAP
> HTTP Request.
Although it does make a distinction between absence of value and
an empty string:
> The header field value of empty string ("") means that the intent
> of the SOAP message is provided by the HTTP Request-URI. No value
> means that there is no indication of the intent of the message.
The empty string interpretation appears to be the desired one.

However, for the action MIME tag the SOAP 1.2 Part 2 specification
says that
> The media type specifies an optional action parameter, which can
> be used to optimize dispatch or routing, among other things.
but also
> The SOAP Action feature defines a single property, which is
> described in Table 14. The value of this property MUST be an
> absolute URI[RFC 3986] and MUST NOT be empty.
which would indicate that we should not be sending an empty
action here.

As I'm not familiar with SOAP and this is long-standing behavior,
I'm just leaving this alone for now...
2021-02-10 12:00:20 +01:00
Nikita Popov
40ba9f6a1a Clarify that location is required in do_request
As far as I can tell, the location is always non-null here,
and the code wouldn't be able to meaningfully work without a
location.
2021-02-10 11:18:20 +01:00
Nikita Popov
cff35ca0b2 Regenerate arginfo file
Somehow missed this in the previous commit.
2021-02-10 11:18:06 +01:00
Nikita Popov
788abb8cc8 Accept null $location in SoapClient::__setLocation()
Currently an empty string is used to unset the location. Once
again, it makes more sense to use a null value for this purpose
(though the special behavior of empty strings is retained).

The code comment above the function also explicitly indicates
that null should be accepted, and the function does return null
rather than an empty string for the old location value (if it
is missing).
2021-02-10 10:50:42 +01:00
Nikita Popov
32d128d219 Make SoapVar arguments nullable
$typeName, $typeNamespace, $nodeName and $nodeNamespace all
special-case the empty string and don't set the property entirely
in that case. It makes more sense to use null to indicate absence
here (though of course the empty string behavior is retained).
2021-02-10 10:36:32 +01:00
Nikita Popov
f1a988af4b Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix persistent leak on load_wsdl_ex failure
2021-02-02 10:07:04 +01:00
Nikita Popov
51d76c346e Fix persistent leak on load_wsdl_ex failure
Move the load_wsdl_ex call into the zend_try that destroys the
docs hash table. The wsdl will be inserted into docs early on,
and will thus be released on subsequent bailout.
2021-02-02 10:05:35 +01:00
Nikita Popov
c72957b409 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix build
2021-02-01 09:46:27 +01:00
Nikita Popov
ab8177de2c Fix build 2021-02-01 09:46:17 +01:00
Stanislav Malyshev
d94d0dda29 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix bug #80672 - Null Dereference in SoapClient
2021-01-31 21:42:48 -08:00
Stanislav Malyshev
86de4d7af6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #80672 - Null Dereference in SoapClient
2021-01-31 21:42:41 -08:00
Stanislav Malyshev
3c939e3f69 Fix bug #80672 - Null Dereference in SoapClient 2021-01-31 21:15:23 -08:00
Nikita Popov
c4a25da096 Update ext/soap parameter names
Closes GH-6300.
2020-10-08 16:32:01 +02:00
Nikita Popov
9e32e1322e Accept bool in SoapClient::__doRequest
$one_way is a boolean argument.
2020-10-08 12:36:49 +02:00
Dmitry Stogov
5f24999237 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed incorrect error message
2020-09-30 08:37:43 +03:00
Dmitry Stogov
2a0e4b88fd Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed incorrect error message
2020-09-30 08:37:35 +03:00
George Peter Banyard
1616363850 Fixed incorrect error message 2020-09-30 08:37:16 +03:00
Dmitry Stogov
b94fd3a3b6 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed incorrect logical condition
2020-09-30 08:29:37 +03:00
Dmitry Stogov
6f0b232648 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed incorrect logical condition
2020-09-30 08:29:21 +03:00
George Peter Banyard
3f5c47af3b Fixed incorrect logical condition 2020-09-30 08:29:00 +03:00
Máté Kocsis
e950ca13ea
Consolidate the usage of "either" and "one of" in error messages
Closes GH-6173
2020-09-20 19:41:47 +02:00
Nikita Popov
c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Sara Golemon
95f2583743
Allow http tests to run in parallel by using ephemeral ports 2020-09-17 14:38:54 +00:00
Nikita Popov
e55a658115 Merge branch 'PHP-7.4'
* PHP-7.4:
  ext/soap: Compare Set-Cookie header case-insensitively
2020-09-17 10:31:48 +02:00
Nikita Popov
f0d2efbadc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  ext/soap: Compare Set-Cookie header case-insensitively
2020-09-17 10:31:30 +02:00
Gabríel Arthúr Pétursson
efc52f1754 ext/soap: Compare Set-Cookie header case-insensitively
Closes GH-6143.
2020-09-17 10:31:06 +02:00
Máté Kocsis
c98d47696f
Consolidate new union type ZPP macro names
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.

Closes GH-6112
2020-09-11 11:00:18 +02:00
twosee
bd1d11d352 Simplify error type filter
Closes GH-6049.
2020-09-10 17:36:04 +08:00
Máté Kocsis
9975986b7e
Improve error messages mentioning parameters instead of arguments
Closes GH-5999
2020-09-09 10:47:43 +02:00
Dmitry Stogov
4a2ae84188 Add "const". Move constant strings to read-only memory. 2020-09-07 21:35:48 +03:00
Máté Kocsis
e50449bcb4
Use the canonical order of types in array|string ZPP error messages 2020-09-04 14:32:33 +02:00
Máté Kocsis
47d9446c48
Promote warnings to exceptions in ext/soap and ext/xmlwriter
Closes GH-5998
2020-09-01 14:22:19 +02:00
Matteo Beccati
cf3fb14679 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"
2020-08-18 18:31:11 +02:00
Matteo Beccati
3877172411 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"
2020-08-18 18:27:26 +02:00
Matteo Beccati
f7c43b8c72 Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked" 2020-08-18 18:10:39 +02:00
Christoph M. Becker
c8e6f05e70 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix HTTP response status code
2020-08-18 08:37:36 +02:00
Christoph M. Becker
3e8172d27b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix HTTP response status code
2020-08-18 08:35:56 +02:00
Christoph M. Becker
1ae80f8c92 Fix HTTP response status code 2020-08-18 08:33:45 +02:00
Máté Kocsis
2803c8fb8d
Add all the missing parameter types to stubs
Closes GH-5955
2020-08-13 14:47:18 +02:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
Nikita Popov
8b77c58130 Accept zend_object* in zend_update_property 2020-08-07 16:40:27 +02:00
Nikita Popov
01cbb5967c Accept zend_object* in zend_unset_property 2020-08-07 16:40:27 +02:00
Nikita Popov
7991fc2753 Accept zend_object in zend_read_property 2020-08-07 16:40:27 +02:00
Máté Kocsis
79981a394e
Add a bunch of missing argument types to stubs 2020-08-03 00:45:51 +02:00
Nikita Popov
86882060ab Use zend_call_method in SoapFault::__toString() 2020-07-23 16:45:53 +02:00
Nikita Popov
ac56ca0dcc Separate __call and __soapCall implementations
This is overly pedantic, but allows us to enable more arginfo
consistency checks.
2020-07-21 12:59:28 +02:00
Nikita Popov
ae81549048 Move SOAP_SERVER_BEGIN_CODE() after zpp
This is still very dubious, because there are lots of other "returns"
between the BEGIN and END -- won't that end up not restoring the
original state?
2020-07-21 12:05:42 +02:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
Closes GH-5590
2020-07-10 21:05:28 +02:00