Bug->Doc #75421 [Opn]: Invalid values accepted for the SoapHeader actor parameter.
| From: | cmb@php.net | Date: | Tue, 23 Mar 2021 14:53:34 +0000 |
| Subject: | Bug->Doc #75421 [Opn]: Invalid values accepted for the SoapHeader actor parameter. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18665@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75421&edit=1
ID: 75421
Updated by: cmb@php.net
Reported by: kguest@php.net
Summary: Invalid values accepted for the SoapHeader actor
parameter.
Status: Open
-Type: Bug
+Type: Documentation Problem
Package: SOAP related
PHP Version: 7.1.10
Block user comment: N
Private report: N
New Comment:
I can confirm the behavior. However, it appears to be debatable
whether it's the responsibility of the user to pass an URI, or
whether SoapHeader::__construct() should reject anything else.
Obviously, the implementation is intentionally liberal[1], and
changing this might break some code.
IMO, we should primarily document this.
[1] <https://github.com/php/php-src/blob/php-7.4.16/ext/soap/soap.c#L841-L851>
Previous Comments:
------------------------------------------------------------------------
[2017-10-23 23:30:44] kguest@php.net
Description:
------------
As per the spec,the SoapHeader actor attribute/parameter should be an URI/URL.
https://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383499
There is no validation to ensure this is the case.
Test script:
---------------
<?php
$namespace = 'urn:Foo-BAR';
$soapVarHeader = "value";
$invalidURL = "http://127_0_0_1/next";
$soapHeader = new SoapHeader($namespace, "name", $soapVarHeader, false, $invalidURL);
var_dump ($soapHeader);
?>
Expected result:
----------------
var_dump should not execute. A warning should be raised/thrown.
Actual result:
--------------
var_dump displays the following. It shouldn't get that far.
class SoapHeader#1 (5) {
public $namespace =>
string(11) "urn:Foo-BAR"
public $name =>
string(4) "name"
public $data =>
string(5) "value"
public $mustUnderstand =>
bool(false)
public $actor =>
string(21) "http://127_0_0_1/next"
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75421&edit=1