Plugin Directory

Changeset 1489878


Ignore:
Timestamp:
09/04/2016 10:38:03 PM (10 years ago)
Author:
Phyrax
Message:

Send errors back to requestor

Location:
woominecraft/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • woominecraft/trunk/README.md

    r1447295 r1489878  
    55**Requires at least:** 4.4.2   
    66**Tested up to:** 4.5.3   
    7 **Stable tag:** 1.0.6   
     7**Stable tag:** 1.0.7   
    88
    99A FREE Minecraft Donation plugin which works in conjunction with my WooMinecraft java plugin for Minecraft to provide a self-hosted donation platform.
     
    5656## Changelog
    5757
     58### 1.0.7
     59* Better error handling for keys, instead of blindly killing over.
     60
    5861### 1.0.6
    5962* Fixed [#96](https://github.com/WooMinecraft/WooMinecraft/issues/96) - Checking wrong post type for cache busting.
  • woominecraft/trunk/readme.txt

    r1447295 r1489878  
    5757== Changelog ==
    5858
     59= 1.0.7 =
     60* Better error handling for keys, instead of blindly killing over.
     61
    5962= 1.0.6 =
    6063* Fixed [#96](https://github.com/WooMinecraft/WooMinecraft/issues/96) - Checking wrong post type for cache busting.
  • woominecraft/trunk/woominecraft.php

    r1447295 r1489878  
    132132     */
    133133    public function json_feed() {
    134         $db_key = get_option( 'wm_key' );
    135         if ( ! isset( $_REQUEST['key'] ) || $db_key !== $_REQUEST['key'] ) {
     134
     135        if ( ! isset( $_REQUEST['key'] ) ) {
    136136            return;
     137        }
     138
     139        $requested_key = esc_attr( $_REQUEST['key'] );
     140        $db_key        = get_option( 'wm_key' );
     141        if ( $requested_key !== $db_key ) {
     142            wp_send_json_error( array( 'msg' => 'Keys do not match, compare keys in WordPress to your config.yml' ) );
    137143        }
    138144
Note: See TracChangeset for help on using the changeset viewer.