Version Description
- Bugfix, typo corrected and PHP notices removed. Thanks to Dion Hulse for his patch.
Download this release
Release Info
Developer | Henrik.Schack |
Plugin | Google Authenticator |
Version | 0.40 |
Comparing to | |
See all releases |
Code changes from version 0.39 to 0.40
- google-authenticator.php +19 -18
- readme.txt +7 -2
google-authenticator.php
CHANGED
@@ -4,9 +4,9 @@ Plugin Name: Google Authenticator
|
|
4 |
Plugin URI: http://henrik.schack.dk/google-authenticator-for-wordpress
|
5 |
Description: Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry app as One Time Password generator.
|
6 |
Author: Henrik Schack
|
7 |
-
Version: 0.
|
8 |
Author URI: http://henrik.schack.dk/
|
9 |
-
Compatibility: WordPress 3.
|
10 |
Text Domain: google-authenticator
|
11 |
Domain Path: /lang
|
12 |
|
@@ -16,10 +16,11 @@ Domain Path: /lang
|
|
16 |
Thanks to Tobias B�thge for his major code rewrite and German translation.
|
17 |
Thanks to Pascal de Bruijn for his relaxed mode idea.
|
18 |
Thanks to Daniel Werl for his usability tips.
|
|
|
19 |
|
20 |
----------------------------------------------------------------------------
|
21 |
|
22 |
-
Copyright
|
23 |
|
24 |
This program is free software; you can redistribute it and/or modify
|
25 |
it under the terms of the GNU General Public License as published by
|
@@ -129,7 +130,7 @@ function create_secret() {
|
|
129 |
*/
|
130 |
function loginform() {
|
131 |
echo "\t<p>\n";
|
132 |
-
echo "\t\t<label
|
133 |
echo "\t\t<input type=\"text\" name=\"otp\" id=\"user_email\" class=\"input\" value=\"\" size=\"20\" tabindex=\"25\" /></label>\n";
|
134 |
echo "\t</p>\n";
|
135 |
}
|
@@ -197,7 +198,7 @@ function profile_personal_options() {
|
|
197 |
$GA_enabled = trim( get_user_option( 'googleauthenticator_enabled', $user_id ) );
|
198 |
$GA_relaxedmode = trim( get_user_option( 'googleauthenticator_relaxedmode', $user_id ) );
|
199 |
$GA_description = trim( get_user_option( 'googleauthenticator_description', $user_id ) );
|
200 |
-
$GA_pwdenabled = trim( get_user_option( 'googleauthenticator_pwdenabled', $
|
201 |
$GA_password = trim( get_user_option( 'googleauthenticator_passwords', $user_id ) );
|
202 |
|
203 |
// We dont store the generated app password in cleartext so there is no point in trying
|
@@ -344,29 +345,29 @@ ENDOFJS;
|
|
344 |
function personal_options_update() {
|
345 |
global $user_id;
|
346 |
|
347 |
-
$GA_enabled
|
348 |
$GA_description = trim( $_POST['GA_description'] );
|
349 |
-
$GA_relaxedmode =
|
350 |
-
$GA_secret
|
351 |
-
$GA_pwdenabled =
|
352 |
$GA_password = str_replace(' ', '', trim( $_POST['GA_password'] ) );
|
353 |
|
354 |
-
if (
|
355 |
$GA_enabled = 'disabled';
|
356 |
-
|
357 |
$GA_enabled = 'enabled';
|
358 |
}
|
359 |
|
360 |
-
if (
|
361 |
$GA_relaxedmode = 'disabled';
|
362 |
-
|
363 |
$GA_relaxedmode = 'enabled';
|
364 |
}
|
365 |
|
366 |
|
367 |
-
if (
|
368 |
$GA_pwdenabled = 'disabled';
|
369 |
-
|
370 |
$GA_pwdenabled = 'enabled';
|
371 |
}
|
372 |
|
@@ -411,11 +412,11 @@ function edit_user_profile() {
|
|
411 |
function edit_user_profile_update() {
|
412 |
global $user_id;
|
413 |
|
414 |
-
$GA_enabled =
|
415 |
|
416 |
-
if (
|
417 |
$GA_enabled = 'disabled';
|
418 |
-
|
419 |
$GA_enabled = 'enabled';
|
420 |
}
|
421 |
|
4 |
Plugin URI: http://henrik.schack.dk/google-authenticator-for-wordpress
|
5 |
Description: Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry app as One Time Password generator.
|
6 |
Author: Henrik Schack
|
7 |
+
Version: 0.40
|
8 |
Author URI: http://henrik.schack.dk/
|
9 |
+
Compatibility: WordPress 3.3.1
|
10 |
Text Domain: google-authenticator
|
11 |
Domain Path: /lang
|
12 |
|
16 |
Thanks to Tobias B�thge for his major code rewrite and German translation.
|
17 |
Thanks to Pascal de Bruijn for his relaxed mode idea.
|
18 |
Thanks to Daniel Werl for his usability tips.
|
19 |
+
Thanks to Dion Hulse for his bugfixes.
|
20 |
|
21 |
----------------------------------------------------------------------------
|
22 |
|
23 |
+
Copyright 2012 Henrik Schack (email : henrik@schack.dk)
|
24 |
|
25 |
This program is free software; you can redistribute it and/or modify
|
26 |
it under the terms of the GNU General Public License as published by
|
130 |
*/
|
131 |
function loginform() {
|
132 |
echo "\t<p>\n";
|
133 |
+
echo "\t\t<label title=\"".__('If you don\'t have Google Authenticator enabled for your WordPress account, leave this field empty.','google-authenticator')."\">".__('Google Authenticator code','google-authenticator')."<span id=\"google-auth-info\"></span><br />\n";
|
134 |
echo "\t\t<input type=\"text\" name=\"otp\" id=\"user_email\" class=\"input\" value=\"\" size=\"20\" tabindex=\"25\" /></label>\n";
|
135 |
echo "\t</p>\n";
|
136 |
}
|
198 |
$GA_enabled = trim( get_user_option( 'googleauthenticator_enabled', $user_id ) );
|
199 |
$GA_relaxedmode = trim( get_user_option( 'googleauthenticator_relaxedmode', $user_id ) );
|
200 |
$GA_description = trim( get_user_option( 'googleauthenticator_description', $user_id ) );
|
201 |
+
$GA_pwdenabled = trim( get_user_option( 'googleauthenticator_pwdenabled', $user_id ) );
|
202 |
$GA_password = trim( get_user_option( 'googleauthenticator_passwords', $user_id ) );
|
203 |
|
204 |
// We dont store the generated app password in cleartext so there is no point in trying
|
345 |
function personal_options_update() {
|
346 |
global $user_id;
|
347 |
|
348 |
+
$GA_enabled = ! empty( $_POST['GA_enabled'] );
|
349 |
$GA_description = trim( $_POST['GA_description'] );
|
350 |
+
$GA_relaxedmode = ! empty( $_POST['GA_relaxedmode'] );
|
351 |
+
$GA_secret = trim( $_POST['GA_secret'] );
|
352 |
+
$GA_pwdenabled = ! empty( $_POST['GA_pwdenabled'] );
|
353 |
$GA_password = str_replace(' ', '', trim( $_POST['GA_password'] ) );
|
354 |
|
355 |
+
if ( ! $GA_enabled ) {
|
356 |
$GA_enabled = 'disabled';
|
357 |
+
} else {
|
358 |
$GA_enabled = 'enabled';
|
359 |
}
|
360 |
|
361 |
+
if ( ! $GA_relaxedmode ) {
|
362 |
$GA_relaxedmode = 'disabled';
|
363 |
+
} else {
|
364 |
$GA_relaxedmode = 'enabled';
|
365 |
}
|
366 |
|
367 |
|
368 |
+
if ( ! $GA_pwdenabled ) {
|
369 |
$GA_pwdenabled = 'disabled';
|
370 |
+
} else {
|
371 |
$GA_pwdenabled = 'enabled';
|
372 |
}
|
373 |
|
412 |
function edit_user_profile_update() {
|
413 |
global $user_id;
|
414 |
|
415 |
+
$GA_enabled = ! empty( $_POST['GA_enabled'] );
|
416 |
|
417 |
+
if ( ! $GA_enabled ) {
|
418 |
$GA_enabled = 'disabled';
|
419 |
+
} else {
|
420 |
$GA_enabled = 'enabled';
|
421 |
}
|
422 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Henrik.Schack
|
|
3 |
Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=henrik%40schack%2edk&lc=US&item_name=Google%20Authenticator&item_number=Google%20Authenticator&no_shipping=0&no_note=1&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8
|
4 |
Tags: authentication,otp,password,security,login,android,iphone,blackberry
|
5 |
Requires at least: 3.1.2
|
6 |
-
Tested up to: 3.3
|
7 |
-
Stable tag: 0.
|
8 |
|
9 |
Google Authenticator for your WordPress blog.
|
10 |
|
@@ -58,6 +58,9 @@ Another option is to enable "relaxed mode" in the settings for the plugin, this
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
61 |
= 0.39 =
|
62 |
* Bugfix, Description was not saved to WordPress database when updating profile. Thanks to xxdesmus for noticing this.
|
63 |
|
@@ -91,4 +94,6 @@ Thanks to:
|
|
91 |
|
92 |
[Daniel Werl](http://technobabbl.es/) for his usability tips.
|
93 |
|
|
|
|
|
94 |
|
3 |
Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=henrik%40schack%2edk&lc=US&item_name=Google%20Authenticator&item_number=Google%20Authenticator&no_shipping=0&no_note=1&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8
|
4 |
Tags: authentication,otp,password,security,login,android,iphone,blackberry
|
5 |
Requires at least: 3.1.2
|
6 |
+
Tested up to: 3.3.1
|
7 |
+
Stable tag: 0.40
|
8 |
|
9 |
Google Authenticator for your WordPress blog.
|
10 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 0.40 =
|
62 |
+
* Bugfix, typo corrected and PHP notices removed. Thanks to Dion Hulse for his patch.
|
63 |
+
|
64 |
= 0.39 =
|
65 |
* Bugfix, Description was not saved to WordPress database when updating profile. Thanks to xxdesmus for noticing this.
|
66 |
|
94 |
|
95 |
[Daniel Werl](http://technobabbl.es/) for his usability tips.
|
96 |
|
97 |
+
[Dion Hulse](http://dd32.id.au/) for his bugfixes.
|
98 |
+
|
99 |
|