Changeset 719657
- Timestamp:
- 05/29/2013 12:46:51 AM (13 years ago)
- Location:
- login-security-solution/trunk
- Files:
-
- 5 edited
-
languages/login-security-solution-fr_FR.mo (modified) (previous)
-
languages/login-security-solution-fr_FR.po (modified) (1 diff)
-
login-security-solution.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
-
tests/PasswordChangeTest.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
login-security-solution/trunk/languages/login-security-solution-fr_FR.po
r718961 r719657 352 352 "utilize WordPress' built in password reset functionality." 353 353 msgstr "" 354 "Cocher cette case obligera tous les utilisateurs ex epté vous, à utiliser le"355 " processus de changement de mot de passe de WordPress."354 "Cocher cette case obligera tous les utilisateurs excepté vous-même, à " 355 "utiliser le processus de changement de mot de passe de WordPress." 356 356 357 357 #: admin.php:733 -
login-security-solution/trunk/login-security-solution.php
r718961 r719657 7 7 * 8 8 * Plugin URI: http://wordpress.org/extend/plugins/login-security-solution/ 9 * Version: 0.3 8.09 * Version: 0.39.0 10 10 * (Remember to change the VERSION constant, below, as well!) 11 11 * Author: Daniel Convissor … … 43 43 * This plugin's version 44 44 */ 45 const VERSION = '0.3 8.0';45 const VERSION = '0.39.0'; 46 46 47 47 /** … … 59 59 const E_NUMBER = 'pw-number'; 60 60 const E_PUNCT = 'pw-punct'; 61 const E_REUSED = 'pw-reused'; 61 62 const E_SEQ_CHAR = 'pw-seqchar'; 62 63 const E_SEQ_KEY = 'pw-seqkey'; … … 737 738 } 738 739 740 if ($this->is_pw_reused($user_pass, $user->ID)) { 741 ###$this->log(__FUNCTION__, "password reused"); 742 $this->redirect_to_login(self::E_REUSED, false, 'rp'); 743 return -2; 744 } 745 739 746 $this->save_verified_ip($user->ID, $this->get_ip()); 740 747 $this->process_pw_metadata($user->ID, $user_pass); … … 810 817 } 811 818 if ($this->is_pw_reused($user->user_pass, $user->ID)) { 812 $this->load_plugin_textdomain();813 819 $errors->add(self::ID, 814 $this->err( __("Passwords can not be reused.", self::ID)),820 $this->err($this->msg(self::E_REUSED)), 815 821 array('form-field' => 'pass1') 816 822 ); … … 1877 1883 */ 1878 1884 protected function msg($code) { 1885 $this->load_plugin_textdomain(); 1879 1886 switch ($code) { 1880 1887 case self::E_ASCII: … … 1892 1899 case self::E_PUNCT: 1893 1900 return sprintf(__("Passwords must either contain punctuation marks / symbols or be %d characters long.", self::ID), $this->options['pw_complexity_exemption_length']); 1901 case self::E_REUSED: 1902 return __("Passwords can not be reused.", self::ID); 1894 1903 case self::E_SEQ_CHAR: 1895 1904 return __("Passwords can't have that many sequential characters.", self::ID); … … 2648 2657 */ 2649 2658 public function validate_pw($user, &$errors = null) { 2650 $this->load_plugin_textdomain();2651 2652 2659 if (is_object($user)) { 2653 2660 $all_tests = true; -
login-security-solution/trunk/readme.txt
r718961 r719657 445 445 446 446 == Changelog == 447 448 = 0.39.0 (2013-05-29) = 449 * Enforce password history during password reset process. 447 450 448 451 = 0.38.0 (2013-05-27) = -
login-security-solution/trunk/tests/PasswordChangeTest.php
r696855 r719657 203 203 $this->assertGreaterThan(0, $actual, 'Changed time should be > 0.'); 204 204 205 $actual = self::$lss->is_pw_reused(self::$pass_1, $this->user->ID);206 $this->assertTrue($actual, 'Password should show up as reused');207 208 205 $this->ensure_grace_and_force_are_empty(); 209 210 $wpdb->query('ROLLBACK TO empty'); 206 } 207 208 /** 209 * @depends test_password_reset__normal 210 */ 211 public function test_password_reset__reused_pw() { 212 global $wpdb; 213 214 $_GET['key'] = 'jk'; 215 $_GET['login'] = 'ab'; 216 217 $expected_error = 'Cannot modify header information'; 218 $this->expected_errors($expected_error); 219 self::$location_expected = get_option('siteurl') 220 . '/wp-login.php?action=rp&key=jk&login=ab&' 221 . self::$lss->key_login_msg 222 . '=pw-reused'; 223 224 $actual = self::$lss->password_reset($this->user, self::$pass_1); 225 $this->assertEquals(-2, $actual, 'password_reset() return.'); 226 227 $wpdb->query('ROLLBACK TO empty'); 228 229 $this->assertTrue($this->were_expected_errors_found(), 230 "Expected error not found: '$expected_error'"); 231 $this->assertEquals(self::$location_expected, self::$location_actual, 232 'wp_redirect() produced unexpected location header.'); 211 233 } 212 234
Note: See TracChangeset
for help on using the changeset viewer.