Skip to content

Commit

Permalink
Sanitize webhook URL
Browse files Browse the repository at this point in the history
  • Loading branch information
hanifn committed Jun 24, 2024
1 parent 902bc04 commit a540e18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/notifications/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,12 @@ public function settings_validate( $new_options ) {
$new_options['webhook_url'] = '';
}

if ( esc_url_raw( $new_options['webhook_url'] ) !== $new_options['webhook_url'] ) {
$new_options['webhook_url'] = '';
} else {
$new_options['webhook_url'] = esc_url_raw( $new_options['webhook_url'] );
}

return $new_options;
}

Expand Down

0 comments on commit a540e18

Please sign in to comment.