Plugin Directory

Changeset 1913863


Ignore:
Timestamp:
07/24/2018 12:29:28 AM (8 years ago)
Author:
tynor
Message:

Updates for Trial status and Pantheon Bug

Location:
lockr/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • lockr/trunk/lockr-admin-config.php

    r1827999 r1913863  
    370370                $cert_path = ABSPATH . $cert_path;
    371371            }
    372                
     372
    373373            if ( ! is_readable($cert_path) ) {
    374374                add_settings_error(
     
    377377                    "{$cert_path} must be a readable file."
    378378                );
    379    
     379
    380380                return $options;
    381381            }
    382        
     382
    383383            update_option( 'lockr_partner', 'custom' );
    384384            update_option( 'lockr_cert', $cert_path );
     
    387387            if ( $partner ) {
    388388                update_option( 'lockr_partner', $partner['name'] );
    389                 update_option( 'lockr_cert', $partner['cert'] );
     389                delete_option( 'lockr_cert' );
    390390            } else {
    391391                update_option( 'lockr_partner', '' );
    392                 update_option( 'lockr_cert', '' );
     392                delete_option('lockr_cert');
    393393            }
    394394        }
     
    402402            $options['account_password'] = '';
    403403        }
    404    
     404
    405405        $name = get_bloginfo( 'name', 'display' );
    406    
     406
    407407        if ( ! filter_var( $options['account_email'], FILTER_VALIDATE_EMAIL ) ) {
    408408            add_settings_error( 'lockr_options', 'lockr-email', $options['account_email'] . ' is not a proper email address. Please try again.', 'error' );
     
    433433        }
    434434        $options['account_password'] = '';
    435         return $options;   
     435        return $options;
    436436    }
    437437}
  • lockr/trunk/lockr-admin-status.php

    r1602402 r1913863  
    5252        $cert_valid = $status['cert_valid'];
    5353        $exists = $status['exists'];
     54        $created = isset($status['created']) ? $status['created'] : false;
    5455
    5556        $items = array();
     
    114115
    115116        if ( $cert_valid ) {
     117            $has_cc = $status['has_cc'];
     118
     119            if ( $created ) {
     120                $expires = ( new \DateTime() )
     121                    ->setTimestamp($created)
     122                    ->add(new \DateInterval('P14D'));
     123                if ( $expires > (new \DateTime()) ) {
     124                    $items[] = array(
     125                        'title' => 'Trial Expiration Date',
     126                        'value' => $expires->format( 'M jS, Y' ),
     127                        'severity' => 'lockr_ok',
     128                    );
     129                } elseif ( !$has_cc ) {
     130                    $items[] = array(
     131                        'title' => 'Trial Expiration Date',
     132                        'value' => $expires->format( 'M jS, Y' ),
     133                        'severity' => 'lockr_error',
     134                    );
     135                }
     136            }
     137
    116138            $partner = $status['info']['partner'];
    117139            $is_custom = in_array($partner, array('custom', 'lockr'));
     
    122144Please add one before migrating to production.
    123145EOL;
    124             $is_not_custom_text = "You're ok for now, no credit card necessary to deploy to production.";
     146            $is_not_custom_text = "Since you're on a partnering host, a credit card is not necessary to move to production. However, please make sure you get a card on file ASAP. We will contact you if there is no card on file within 30 days of moving to production use.";
    125147            $default_description = $is_custom ? $is_custom_text : $is_not_custom_text;
    126148            $has_cc_text = <<<EOL
     
    128150invoice for your key usage.
    129151EOL;
    130             $has_cc = $status['has_cc'];
     152
    131153            $items[] = array(
    132154                'title' => 'Credit Card on File',
  • lockr/trunk/lockr-admin.php

    r1827999 r1913863  
    5252  if ( $partner ) {
    5353    add_option( 'lockr_partner', $partner['name'] );
    54     add_option( 'lockr_cert', $partner['cert'] );
    5554  }
    5655}
  • lockr/trunk/lockr.php

    r1827999 r1913863  
    77Plugin URI: https://lockr.io/
    88Description: Integrate with the Lockr hosted secrets management platform. Secure all your plugin passwords, API tokens and encryption keys according to industry best practices. With Lockr, secrets management is easy.
    9 Version: 2.2
     9Version: 2.3
    1010Author: Lockr
    1111Author URI: htts://lockr.io/
     
    103103    if ( $partner ) {
    104104        add_option( 'lockr_partner', $partner['name'] );
    105         add_option( 'lockr_cert', $partner['cert'] );
    106105    }
    107106}
     
    186185
    187186    if ( get_option( 'lockr_cert', false ) ) {
    188         $cert_path = get_option( 'lockr_cert' );
    189         if ( $cert_path ) {
    190             return new Partner( $cert_path, 'custom', $region );
    191         }
    192 
    193         return new NullPartner( $region );
     187
     188        $partner = get_option( 'lockr_partner', null );
     189
     190        if( $partner == 'custom'){
     191            $cert_path = get_option('lockr_cert');
     192            if ($cert_path) {
     193                return new Partner($cert_path, 'custom', $region);
     194            }
     195
     196            return new NullPartner($region);
     197        }
    194198    }
    195199
     
    250254        return null;
    251255    }
    252    
     256
    253257    $key = base64_decode($key);
    254258
  • lockr/trunk/readme.txt

    r1827999 r1913863  
    2626* Regular Backups
    2727* Multiple Region Redundancy
    28 * Backed by Townsend Security's FIPS 140-2 compliant key manager, your keys are secured to industry standards. 
     28* Backed by Townsend Security's FIPS 140-2 compliant key manager, your keys are secured to industry standards.
    2929
    3030= Lockr is the first key management service for WordPress. =
     
    3434Lockr is available for WordPress sites of all sizes. Easy to use for the novice site owner and advanced enough for the expert developer, Lockr secures web transactions and data at rest by protecting API and encryption keys.
    3535For Site Builders: fill out a single registration form and you’re set. To use with other plugins, look for those that have Lockr available or use our patch library to update your favorite plugin to use Lockr.
    36 For Developers: Lockr provides an easy to use framework to “get and set” keys from your custom plugin. Additionally, Lockr provides a simple to use yet strong AES-256 encryption function, ensuring your data is encrypted according to industry best-practices and securely stored. Using Lockr helps keep the developer safe, by removing the sensitive passwords and key secrets from the code and database, following security best practices should a site be compromised. 
     36For Developers: Lockr provides an easy to use framework to “get and set” keys from your custom plugin. Additionally, Lockr provides a simple to use yet strong AES-256 encryption function, ensuring your data is encrypted according to industry best-practices and securely stored. Using Lockr helps keep the developer safe, by removing the sensitive passwords and key secrets from the code and database, following security best practices should a site be compromised.
    3737
    3838= Is Lockr Safe? =
     
    4848
    49491. Upload the Lockr directory to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
    50 2. Activate Lockr through the 'Plugins' screen in your WordPress 
     502. Activate Lockr through the 'Plugins' screen in your WordPress
    51513. Visit Settings > Lockr
    52524. If you are on a partnering hosting provider you can skip the automation and go directly to registering your site. If you are not, follow the steps in the forms presented to automate the issuance of a certificate to connect to Lockr.
     
    6969Not to any noticeable effect. The connection to the Lockr server depends on the speed of your servers connection but on average we see round trips of under 200ms. This is about the same time that some database queries take.
    7070
    71 = What is the uptime guarantee of Lockr = 
     71= What is the uptime guarantee of Lockr =
    7272
    7373We know your keys are critical to your site. To ensure you have your keys whenever you need it our cloud is built to scale, and we back that with a 99.9% uptime guarantee. A dedicated SLA is available for enterprise clients.
     
    7777
    7878== Changelog ==
     79
     80= 2.3 =
     81With our new pricing, and free trial period, we've added a row to the status table to show when the trial period ends. We've also fixed a bug that caused some intermittent issues on Pantheon.
    7982
    8083= 2.2 =
     
    9497
    9598= 2.0 =
    96 * Hello WordPress! Lockr is happy to be a part of the community and officially in the plugin directory. 
     99* Hello WordPress! Lockr is happy to be a part of the community and officially in the plugin directory.
    97100* To celebrate our release we have provided a function to encrypt/decrypt data based on a key stored in Lockr. Simply use lockr_encrypt() and lockr_decrypt() to secure your data. More features around encryption are planned for future releases
  • lockr/trunk/src/Lockr/KeyWrapper/LockrAesCbcKeyWrapper.php

    r1604775 r1913863  
    7474    }
    7575
    76     protected function encode($cipher, $mode, $iv, $key)
     76    protected static function encode($cipher, $mode, $iv, $key)
    7777    {
    7878        $parts = array(
     
    8686    }
    8787
    88     protected function decode($encoded)
     88    protected static function decode($encoded)
    8989    {
    9090        $parts = explode('$', $encoded, 4);
Note: See TracChangeset for help on using the changeset viewer.