diff --git a/options-admin.php b/options-admin.php index 4a7025c..aa0f415 100644 --- a/options-admin.php +++ b/options-admin.php @@ -205,7 +205,7 @@ function shibboleth_options_page() { $constant = $constant || $from_constant; list( $spoofkey, $from_constant ) = shibboleth_getoption( 'shibboleth_spoof_key', false, false, true ); $constant = $constant || $from_constant; - list( $default_login, $from_constant ) = shibboleth_getoption( 'shibboleth_default_login', false, false, true ); + list( $default_login, $from_constant ) = shibboleth_getoption( 'shibboleth_default_to_shib_login', false, false, true ); $constant = $constant || $from_constant; list( $auto_login, $from_constant ) = shibboleth_getoption( 'shibboleth_auto_login', false, false, true ); $constant = $constant || $from_constant; @@ -634,7 +634,7 @@ function AttributeAccessMethod()

diff --git a/readme.txt b/readme.txt index f9fa015..05a15fa 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: michaelryanmcneill, willnorris, mitchoyoshitaka, jrchamp, dericcrago, bshelton229 Tags: shibboleth, authentication, login, saml Requires at least: 3.3 -Tested up to: 4.9.2 -Stable tag: 2.1 +Tested up to: 4.9.6 +Stable tag: 2.1.1 Allows WordPress to externalize user authentication and account creation to a Shibboleth Service Provider. @@ -186,6 +186,11 @@ This update brings with it a major change to the way Shibboleth attributes are a This update brings with it a major change to the way Shibboleth attributes are accessed. For most users, no additional configuration will be necessary. If you are using a specialized server configuration, such as a Shibboleth Service Provider on a reverse proxy or a server configuration that results in environment variables being sent with the prefix REDIRECT_, you should see the changelog for additional details: https://wordpress.org/plugins/shibboleth/#developers == Changelog == += version 2.1.1 (2018-05-16) = + - Minor code cleanup for disabling authentication and passsword resets; props [@jrchamp](https://github.com/michaelryanmcneill/shibboleth/commit/06c28bec6d42e92a9338961e2f7ed4a7ae8a0f71#commitcomment-29005081). + - Resolved a minor problem where setting the SHIBBOLETH_LOGGING constant on PHP 5.5 or below would not work in the administrative interface; props [@jrchamp](https://github.com/michaelryanmcneill/shibboleth/pull/47#discussion_r188758184). + - Resolved an issue with the default to shibboleth login option in the admin; [thanks to @trandrew for reporting](https://github.com/michaelryanmcneill/shibboleth/issues/48). + = version 2.1 (2018-05-16) = - Resolved an issue where in multisite users could inadvertently be sent to an unrelated subsite after logging in; [thanks to @themantimeforgot for reporting](https://github.com/michaelryanmcneill/shibboleth/issues/33) and [props to @jrchamp for the fix](https://github.com/michaelryanmcneill/shibboleth/pull/35). - Resolved an regression that prevented users from authenticating if shibboleth_default_role is blank and shibboleth_create_accounts is enabled; props [@jrchamp](https://github.com/michaelryanmcneill/shibboleth/pull/37). diff --git a/shibboleth.php b/shibboleth.php index bb9a05d..4c4ca3d 100644 --- a/shibboleth.php +++ b/shibboleth.php @@ -4,13 +4,13 @@ Plugin URI: http://wordpress.org/extend/plugins/shibboleth Description: Easily externalize user authentication to a Shibboleth Service Provider Author: Michael McNeill, mitcho (Michael 芳貴 Erlewine), Will Norris - Version: 2.1 + Version: 2.1.1 License: Apache 2 (http://www.apache.org/licenses/LICENSE-2.0.html) Text Domain: shibboleth */ define( 'SHIBBOLETH_MINIMUM_WP_VERSION', '3.3' ); -define( 'SHIBBOLETH_PLUGIN_VERSION', '2.1' ); +define( 'SHIBBOLETH_PLUGIN_VERSION', '2.1.1' ); /** * Determine if this is a new install or upgrade and, if so, run the @@ -796,12 +796,14 @@ function shibboleth_disable_login() { $bypass = defined( 'SHIBBOLETH_ALLOW_LOCAL_AUTH' ) && SHIBBOLETH_ALLOW_LOCAL_AUTH; - if ( $disable && ! $bypass && isset( $_GET['action'] ) && $_GET['action'] === 'lostpassword' ) { - // Disable the ability to reset passwords from wp-login.php - add_filter( 'allow_password_reset', '__return_false' ); - } elseif ( $disable && ! $bypass && ( isset( $_POST['log'] ) || isset( $_POST['user_login'] ) ) ) { - // Disable the ability to login using local authentication - wp_die( __( 'Shibboleth authentication is required.', 'shibboleth' ) ); + if ( $disable && ! $bypass ) { + if ( isset( $_GET['action'] ) && $_GET['action'] === 'lostpassword' ) { + // Disable the ability to reset passwords from wp-login.php + add_filter( 'allow_password_reset', '__return_false' ); + } elseif ( isset( $_POST['log'] ) || isset( $_POST['user_login'] ) ) { + // Disable the ability to login using local authentication + wp_die( __( 'Shibboleth authentication is required.', 'shibboleth' ) ); + } } } add_action( 'login_init', 'shibboleth_disable_login' );