diff --git a/README.md b/README.md index 0e92c5a..0743b6a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ Plugin WordPress per l'interfacciamento con il Sistema Pubblico di Identità Dig ## Credits -Copyright © 2017-2022 **Marco Milesi** - www.marcomilesi.com - www.wpgov.it +Copyright © 2017-2022 **Marco Milesi** +www.marcomilesi.com - www.wpgov.it ### Ringraziamenti * **Christian Ghellere, Andrea Smith**: attività di software testing diff --git a/admin/settings.php b/admin/settings.php index 51e9d10..8a23678 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -9,8 +9,10 @@ function spid_get_tabs( $id ) { break; case 1: $id1 = ' nav-tab-active'; + break; case 2: $id2 = ' nav-tab-active'; + break; } $r = '
+ Hai bisogno di aiuto? Consulta la documentazione o contattaci per una consulenza. +
@@ -53,6 +57,7 @@ function spid_menu_func() { | /> + Lasciare questa opzione disattiva quando non sono in corso test |
---|---|
- + Codice ISO 3166-1 α-2 del Paese ove è situata la sede legale del SP (esempio: IT) | - + |
- + | |
- + | |
- + | |
- your organization full name + your organization full name | |
- your organization display name + your organization display name | |
- + | |
- + | |
- + | |
- + |
Attenzione! Questo URL è riservato e deve essere conservato con cura. Non comunicarlo a terzi e non indicarlo su siti o forum di supporto.
'; echo 'URL metadata: '.spid_get_metadata_url().'
'; } else { echo spid_get_tabs( 0 ); diff --git a/readme.txt b/readme.txt index 2f3db1b..d98e6a5 100644 --- a/readme.txt +++ b/readme.txt @@ -5,8 +5,8 @@ Tags: spid, italia, sistema, pubblico, identità, digitale, login, sistema pubbl Requires at least: 4.8 Requires PHP: 7 Tested up to: 5.9 -Version: 2.2.4 -Stable tag: 2.2.4 +Version: 2.3 +Stable tag: 2.3 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -25,7 +25,8 @@ https://www.youtube.com/watch?v=w5Z5EBG1R1M https://www.youtube.com/watch?v=i2eTL_Q2xfM -Copyright © 2017-2022 **Marco Milesi** - [www.marcomilesi.com](https://www.marcomilesi.com) - [www.wpgov.it](https://www.wpgov.it) +Copyright © 2017-2022 **Marco Milesi** +[www.marcomilesi.com](https://www.marcomilesi.com) - [www.wpgov.it](https://www.wpgov.it) ### Ringraziamenti * **Christian Ghellere, Andrea Smith**: attività di software testing @@ -50,6 +51,13 @@ https://www.youtube.com/watch?v=2UNAtVjFFAs == Changelog == > Backup your data before upgrade. += 2.3 20211230 = +* [NEW] Added compatibility with third party login URL modifiers and custom filters - check [wiki](https://github.com/WPGov/wp-spid-italia/wiki) +* [IMPROVEMENT] Performance boost +* [IMPROVEMENT] Settings page changes +* [IMPROVEMENT] Readme and doc changes +* [BUGFIX] Removed some warnings + = 2.2.4 20211201 = * [BUGFIX] Minor bugfix - https://github.com/WPGov/wp-spid-italia/releases diff --git a/wp-spid-italia.php b/wp-spid-italia.php index d05fdb7..0d681e7 100644 --- a/wp-spid-italia.php +++ b/wp-spid-italia.php @@ -3,7 +3,7 @@ Plugin Name: WP SPID Italia Description: SPID - Sistema Pubblico di Identità Digitale Author: Marco Milesi -Version: 2.2.4 +Version: 2.3 Author URI: http://www.marcomilesi.com */ @@ -132,7 +132,7 @@ function() { include( plugin_dir_path( __FILE__ ) . 'admin/settings.php'); spid_ try { $sp = spid_load(); if ( $sp && $sp->isAuthenticated() ) { - return get_site_url() . '/wp-login.php?spid_sso=out'; + return wp_spid_italia_get_login_url( 'out' ) .'?spid_sso=out'; } } catch ( Exception $e) { @@ -221,8 +221,7 @@ function spid_errors( $errorMsg2 ){ wp_clear_auth_cookie(); remove_action('login_footer', 'wp_shake_js', 12); add_filter( 'login_errors', function() { return 'Disconnesso da SPID'; } ); - $sp->logout( 0, get_site_url() . '/wp-login.php?spid_sso=out' ); - //$sp->logout( 0, wp_logout_url() ); + $sp->logout( 0, wp_spid_italia_get_login_url( 'out' ) .'?spid_sso=out' ); } else if (isset($_POST) && isset($_POST['selected_idp'])) { $idp = $_POST['selected_idp']; } else if ( isset( $_GET['spid_sso'] ) && $_GET['spid_sso'] == 'in' ) { @@ -234,8 +233,7 @@ function spid_errors( $errorMsg2 ){ if ( isset( $_GET['spid_idp'] ) && $_GET['spid_idp'] != '' ) { if ( $sp->isAuthenticated() ) { session_destroy(); - $_SESSION = NULL; - #$sp->logout( 0, get_site_url() . '/wp-login.php?spid_sso=out&' ); + $_SESSION = NULL; } $assertId = 0; // index of assertion consumer service as per the SP metadata (sp_assertionconsumerservice in settings array) $attrId = 0; // index of attribute consuming service as per the SP metadata (sp_attributeconsumingservice in settings array) @@ -282,7 +280,7 @@ function spid_errors( $errorMsg2 ){ $attributes = $sp->getAttributes(); echo 'Gentile '.$attributes['name'].',