Fix security warnings

This commit is contained in:
Alex P. 2025-07-15 10:57:25 +03:00
parent 2c59a006f5
commit 53d5c35a81
No known key found for this signature in database
GPG key ID: 68E4DCB139B18520
2 changed files with 3 additions and 2 deletions

View file

@ -80,7 +80,7 @@ class Renderer implements RendererInterface {
printf(
'<div class="notice notice-%s %s" %s%s><p>%s</p></div>',
$message->type(),
esc_attr( $message->type() ),
( $message->is_dismissible() ) ? 'is-dismissible' : '',
( $message->wrapper() ? sprintf( 'data-ppcp-wrapper="%s"', esc_attr( $message->wrapper() ) ) : '' ),
// Use `empty()` in condition, to avoid false phpcs warning.

View file

@ -241,7 +241,8 @@ class ApplepayModule implements ServiceModule, ExtendingModule, ExecutableModule
$validation_string = $this->validation_string( $is_sandbox );
nocache_headers();
header( 'Content-Type: text/plain', true, 200 );
echo $validation_string;// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $validation_string;
exit;
}
}