Changeset 911291
- Timestamp:
- 05/09/2014 07:41:40 PM (12 years ago)
- Location:
- eig-sso/trunk
- Files:
-
- 2 edited
-
eig-sso.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eig-sso/trunk/eig-sso.php
r907551 r911291 2 2 /* 3 3 Plugin Name: EIG-SSO 4 Version: 1.0. 14 Version: 1.0.2 5 5 Description: Securely log in to WordPress from Control Panel without needing a username and password. 6 6 Author: Endurance International Group … … 62 62 63 63 $hash = base64_encode( hash( 'sha256', $nonce . $salt, true ) ); 64 $now = time();65 $expiration = $now + 20;66 64 67 65 $table = $wpdb->prefix . 'eig_sso'; … … 71 69 $wpdb->prepare( 72 70 "SELECT 1=1 FROM $table 73 WHERE offer = %s AND expires >= %s AND expires < %s",74 $hash , $now, $expiration71 WHERE offer = %s AND expires >= UNIX_TIMESTAMP()", 72 $hash 75 73 ) 76 74 ); … … 118 116 119 117 $table = $wpdb->prefix . 'eig_sso'; 120 $res = $wpdb->query( " TRUNCATE TABLE $table" );118 $res = $wpdb->query( "DELETE FROM $table WHERE expires < UNIX_TIMESTAMP()" ); 121 119 122 /* if the user doesn't have truncate privileges */ 123 if ( true !== $res ) { 124 $res = $wpdb->query( "DELETE FROM $table WHERE 1" ); 125 } 126 127 return $res; 120 return false !== $res; 128 121 } 129 122 -
eig-sso/trunk/readme.txt
r907551 r911291 4 4 Requires at least: 3.3 5 5 Tested up to: 3.9 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 49 49 == Changelog == 50 50 51 1.0.2 - Fix timing issues. 52 51 53 1.0.1 - Fix uninstall bug. 52 54
Note: See TracChangeset
for help on using the changeset viewer.