Plugin Directory

Changeset 2033509


Ignore:
Timestamp:
02/18/2019 05:05:58 PM (7 years ago)
Author:
freediver
Message:

version 4.6.5

Location:
worker/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • worker/trunk/functions.php

    r2030113 r2033509  
    790790    }
    791791
     792    mwp_context()->optionSet('mwp_public_keys_refresh_time', time(), true);
    792793    mwp_context()->optionSet('mwp_public_keys', $liveKeys, true);
    793794}
  • worker/trunk/init.php

    r2030113 r2033509  
    44Plugin URI: https://managewp.com
    55Description: We help you efficiently manage all your WordPress websites. <strong>Updates, backups, 1-click login, migrations, security</strong> and more, on one dashboard. This service comes in two versions: standalone <a href="https://managewp.com">ManageWP</a> service that focuses on website management, and <a href="https://godaddy.com/pro">GoDaddy Pro</a> that includes additional tools for hosting, client management, lead generation, and more.
    6 Version: 4.6.4
     6Version: 4.6.5
    77Author: ManageWP
    88Author URI: https://managewp.com
     
    569569        register_activation_hook(__FILE__, 'mwp_activation_hook');
    570570
    571         $GLOBALS['MMB_WORKER_VERSION']  = '4.6.4';
    572         $GLOBALS['MMB_WORKER_REVISION'] = '2019-02-05 00:00:00';
     571        $GLOBALS['MMB_WORKER_VERSION']  = '4.6.5';
     572        $GLOBALS['MMB_WORKER_REVISION'] = '2019-02-18 00:00:00';
    573573
    574574        // Ensure PHP version compatibility.
  • worker/trunk/readme.txt

    r2030113 r2033509  
    33Tags: manage multiple sites, backup, security, migrate, performance, analytics, Manage WordPress, Managed WordPress, WordPress management, WordPress manager, WordPress management, site management, control multiple sites, WordPress management dashboard, administration, automate, automatic, comments, clone, dashboard, duplicate, google analytics, login, manage, managewp, multiple, multisite, remote, seo, spam
    44Requires at least: 3.1
    5 Tested up to: 5.0
     5Tested up to: 5.1
    66Stable tag: trunk
    77License: GPLv3 or later
     
    5656
    5757== Changelog ==
     58
     59= 4.6.5 =
     60
     61- Fix: Edge cases where the Worker plugin might not be able to communicate with our system.
    5862
    5963= 4.6.4 =
  • worker/trunk/src/MWP/EventListener/MasterRequest/AuthenticateRequest.php

    r2030113 r2033509  
    4747
    4848        if (!empty($establishedNewCommunication) && !empty($siteId)) {
    49             throw new MWP_Worker_Exception(MWP_Worker_Exception::AUTHENTICATION_PUBLIC_KEY_EMPTY, "Authentication failed. Deactivate and activate the ManageWP Worker plugin on this site, then re-add it to your ManageWP account.");
     49            throw new MWP_Worker_Exception(MWP_Worker_Exception::AUTHENTICATION_INVALID_SERVICE_SIGNATURE, "Invalid message signature. Please re-add this website to your ManageWP account.");
    5050        }
    5151
  • worker/trunk/src/MWP/EventListener/PublicRequest/AddConnectionKeyInfo.php

    r2030113 r2033509  
    4747        $this->context->enqueueStyle('wp-jquery-ui');
    4848        $this->context->enqueueStyle('wp-jquery-ui-dialog');
     49    }
     50
     51    protected function checkForKeyRefresh()
     52    {
     53        if (empty($_GET['mwp_force_key_refresh'])) {
     54            return false;
     55        }
     56
     57        mwp_refresh_live_public_keys(array());
     58        return true;
    4959    }
    5060
     
    219229            return;
    220230        }
     231
     232        $refreshedKeys = $this->checkForKeyRefresh();
    221233
    222234        ob_start();
     
    302314                    data-clipboard-target="#connection-key">Copy
    303315            </button>
     316
     317            <?php if ($refreshedKeys) { ?>
     318                <p>Currently loaded keys:</p>
     319                <pre><?php
     320                    if (version_compare(PHP_VERSION, '5.4', '>=') && defined('JSON_PRETTY_PRINT')) {
     321                        echo trim(json_encode($this->context->optionGet('mwp_public_keys', null), JSON_PRETTY_PRINT));
     322                    } else {
     323                        echo trim(json_encode($this->context->optionGet('mwp_public_keys', null)));
     324                    }
     325                    ?></pre>
     326                <?php
     327            }
     328            ?>
    304329        </div>
    305330        <?php
  • worker/trunk/src/MWP/Worker/Configuration.php

    r2030113 r2033509  
    8787    protected function findKeyData($keyName)
    8888    {
     89        $key = $this->findKey($keyName);
     90
     91        if (!empty($key)) {
     92            return $key;
     93        }
     94
     95        $time         = time();
     96        $keys         = $this->context->optionGet('mwp_public_keys', null);
     97        $refresh_time = $this->context->optionGet('mwp_public_keys_refresh_time', $time - 100000);
     98
     99        // if the keys were refreshed recently, give up
     100        if (!empty($keys) && $time - $refresh_time < 86400) {
     101            return null;
     102        }
     103
     104        mwp_refresh_live_public_keys(array());
     105
     106        return $this->findKey($keyName);
     107    }
     108
     109    private function findKey($keyName)
     110    {
    89111        $keys = $this->context->optionGet('mwp_public_keys', null);
    90 
    91         if (empty($keys)) {
    92             mwp_refresh_live_public_keys(array());
    93             $keys = $this->context->optionGet('mwp_public_keys', null);
    94         }
    95112
    96113        if (empty($keys) || !is_array($keys)) {
  • worker/trunk/src/MWP/Worker/Exception.php

    r1792348 r2033509  
    2828    const AUTHENTICATION_PUBLIC_KEY_EMPTY = 10017;
    2929    const AUTHENTICATION_INVALID_SIGNATURE = 10019;
     30    const AUTHENTICATION_INVALID_SERVICE_SIGNATURE = 10040;
    3031    const ACTION_NOT_REGISTERED = 10020;
    3132    const CONNECTION_PUBLIC_KEY_NOT_PROVIDED = 10021;
  • worker/trunk/version

    r2030113 r2033509  
    1 4.6.4
    2 2019-02-05 00:00:00
     14.6.5
     22019-02-18 00:00:00
Note: See TracChangeset for help on using the changeset viewer.