Skip to content

Commit

Permalink
All output should be run through an escaping function.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Oct 11, 2023
1 parent e14f177 commit 73632a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ private function request( $message ) {
$return = $this->parse_xml( $xml );

if ( is_object( $return ) && isset( $return->result ) && 'error' === $return->result ) {
throw new \Exception( $xml->error->description );
throw new \Exception(
\esc_html( $xml->error->description )
);
}

return $return;
Expand Down

0 comments on commit 73632a1

Please sign in to comment.