Skip to content
Snippets Groups Projects

bugfix(ajax): permission check

Merged Grzegorz Rola requested to merge bugfix/permission-check into master
5 files
+ 3
4
Compare changes
  • Side-by-side
  • Inline

Files

+ 1
1
@@ -79,7 +79,7 @@ class AjaxHandler implements HookablePluginDependant {
$noticeName = sanitize_text_field( $_POST[ self::POST_FIELD_NOTICE_NAME ] );
$option_name = PermanentDismissibleNotice::OPTION_NAME_PREFIX . $noticeName;
ajax_check_referer( $option_name, self::POST_FIELD_SECURITY );
check_ajax_referer( $option_name, self::POST_FIELD_SECURITY );
if ( ! current_user_can( 'edit_posts' ) ) {
wp_send_json_error();
Loading