Skip to content

Commit

Permalink
fix: hide password from request logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Hazhur committed Jun 29, 2023
1 parent 45cae2a commit 541be04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Requests/SoapRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function request(string $method, array $requestBody, bool $convertToSoap
'SOAP REQUEST SUCCESS:'.
"\nSOAP method: ".$method.
property_exists($this->soapClient, '__last_request')
? "\nSOAP request start***".$this->soapClient->__last_request.'***SOAP request end'
? "\nSOAP request start***".preg_replace("#<password>.+</password>#", '<password>*****</password>', $this->soapClient->__last_request).'***SOAP request end'
: ''
);
}
Expand Down Expand Up @@ -74,7 +74,7 @@ public function request(string $method, array $requestBody, bool $convertToSoap
"\nSOAP method: ".$method.
(
property_exists($this->soapClient, '__last_request')
? "\nSOAP request start***".$this->soapClient->__last_request.'***SOAP request end'
? "\nSOAP request start***".preg_replace("#<password>.+</password>#", '<password>*****</password>', $this->soapClient->__last_request).'***SOAP request end'
: ''
).(
property_exists($this->soapClient, '__last_response')
Expand Down

0 comments on commit 541be04

Please sign in to comment.