Skip to content

Commit

Permalink
Check $error to be not empty before running htmlspecialchars.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuasha420 committed Nov 1, 2022
1 parent 1803281 commit 94076fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/Modules/Analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ protected function handle_provisioning_callback() {
}

// Check for a returned error.
$error = htmlspecialchars( $input->filter( INPUT_GET, 'error' ) );
$error = $input->filter( INPUT_GET, 'error' );
if ( ! empty( $error ) ) {
wp_safe_redirect(
$this->context->admin_url( 'module-analytics', array( 'error_code' => $error ) )
$this->context->admin_url( 'module-analytics', array( 'error_code' => htmlspecialchars( $error ) ) )
);
exit;
}
Expand Down

0 comments on commit 94076fe

Please sign in to comment.