Plugin Directory

Changeset 2744067


Ignore:
Timestamp:
06/17/2022 11:18:05 AM (4 years ago)
Author:
tferry
Message:

Release 1.2.1

Location:
fibre/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • fibre/trunk

    • Property svn:ignore set to
      composer.json
      phpcs.xml
  • fibre/trunk/config.php

    r2184518 r2744067  
    11<?php
    22
    3 define('FIBRE_CLIENT_VERSION', '1.2');
     3define('FIBRE_CLIENT_VERSION', '1.2.1');
    44define('FIBRE_CLIENT_PATH', plugin_dir_path(__FILE__));
    55define('FIBRE_CLIENT_BASENAME', plugin_basename(__FILE__));
  • fibre/trunk/fibre.php

    r2184518 r2744067  
    44 * Plugin URI: https://fibre.io
    55 * Description: Fibre Client for the Fibre Platform
    6  * Version: 1.2
     6 * Version: 1.2.1
    77 * Author: Wholegrain Digital
    88 * Author URI: https://www.wholegraindigital.com
  • fibre/trunk/includes/client.php

    r2184518 r2744067  
    3333                'methods'  => $method,
    3434                'callback' => '\Fibre\Client\Client::routeHandlerData',
     35                'permission_callback' => '\Fibre\Client\Client::isAuthenticated',
    3536            ]
    3637        );
     
    4344                'methods'  => $method,
    4445                'callback' => '\Fibre\Client\Client::routeHandlerUser',
     46                'permission_callback' => '\Fibre\Client\Client::isAuthenticated',
    4547            ]
    4648        );
     
    7981    public static function routeHandlerData()
    8082    {
    81         // Check if there is a valid token and if not throw an error
    82         if (\Fibre\Client\Authentication::authenticate() !== true) {
    83             return self::authenticationFailed();
    84         }
    85 
    8683        return self::getData();
    8784    }
     
    8986    public static function routeHandlerUser()
    9087    {
    91         // Check if there is a valid token and if not throw an error
    92         if (\Fibre\Client\Authentication::authenticate() !== true) {
    93             return self::authenticationFailed();
    94         }
    95 
    9688        // Check if an email key was provided
    9789        if (array_key_exists('email', $_POST) !== true) {
     
    120112
    121113
     114    public static function isAuthenticated()
     115    {
     116        // Check if there is a valid token and if not throw an error
     117        if (\Fibre\Client\Authentication::authenticate() !== true) {
     118            return self::authenticationFailed();
     119        }
     120
     121        return true;
     122    }
     123
     124
    122125    private static function authenticationFailed()
    123126    {
  • fibre/trunk/readme.txt

    r2184518 r2744067  
    88Requires at least: 4.7
    99Requires PHP: 5.3
    10 Tested up to: 5.2.4
     10Tested up to: 6.0
    1111
    1212Manage your WordPress websites remotely and learn what you can improve or fix.
     
    4444
    4545== Changelog ==
     46
     47= 1.2.1 =
     48* Fixes incorrect REST API permission callback implimentation
     49* Tested on WP 6.0
    4650
    4751= 1.2 =
Note: See TracChangeset for help on using the changeset viewer.