Alain-Aymerick FRANCOIS
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Cassify] About redirection if cms login url changedHi,
I’ve tested WPS Hide Login without WP Cassify. This plugin is buggy. When i try do access directly to xxxx.com/wp-admin/, it give me a 404 error.
Is your homepage (xxxx.com) protected by authentication or is public page ?
Can you give me more informations when you try to connect to CAS Server ? From wich blog URL ?
Have you tried to build auth button link with shortcode : https://wpcassify.wordpress.com/plugin-shortcodes/
With shortcode you can put your custom login URL to replace standard wp-login.php.
Best regards
Forum: Plugins
In reply to: [WP Cassify] php errorOkay, update to 1.6.6 solve the problèmes. Si, i close ticket.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] Authenticated CAS user and uncheck Create user if not existHi,
First of all, please re-post the seconde question in new thread, it would be clearly for another users.
Okay, it’s normal that you’re redirected directly to standard CAS logout page. Probably, you’ve not configured your CAS server with “followServiceRedirects” option.
https://jasig.github.io/cas/4.2.x/installation/Logout-Single-Signout.html- Deactivate WPS Hide Login plugin
- Configure followServiceRedirects option in your CAS Server. Edit cas.properties file and then put this option to “true” like below.
- Create a public page in your blog where your explain the reason of user logout : You’ve been disconnected because you’ve not local WordPress Account ! Please contact admin@yoursite.edu
- In WP Cassify admin page, in Authorization rules settings panel, put url of public logout page previously created in User not allowed redirect url field
- Update changes
In your cas.properties (On your CAS Server) :
cas.logout.followServiceRedirects=trueNB : If you leave empty User not allowed redirect url option, home_url() is used instead.
Keep me informed if it solved your problem.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] Authenticated CAS user and uncheck Create user if not existHi,
In new version 1.6.6, i’ve created a new custom hook. You can use like this in your functions.php (located inside your theme) or in another plugin file (loaded after wp-cassify plugin).
add_action( ‘wp_cassify_before_auth_user_wordpress’, ‘custom_action_before_auth_user_wordpress’, 1, 1 );
function custom_action_before_auth_user_wordpress( $cas_user_datas ) {
if (! username_exists( $cas_user_datas[ ‘cas_user_id’ ] ) ) {
$GLOBALS[‘wp-cassify’]->wp_cassify_logout();
}
}Keep me informed if it solved your problem.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] php errorHi,
Thanks for reply. You’re right. I’ve forgotten to pass $wp_cassify_network_activated in init() function of WP_Cassify_Shortcodes class. Then, if you’ve activated plugin on Network, it generate an error.
I’ve corrected the code in version 1.6.6.
Keep me informed if bug is still present in new version.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] error beyond a reverse proxyHi,
Thanks for your reply. You are right ! I’ve made a test behind a reverse proxy. It seems that if application is hosted behind a reverse proxy, server variable $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ] is set and if application is hosted without proxy $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ] is not set.
So I’ve made a fix in new plugin version like that :
// If cassified application is hosted behind reverse proxy.
if ( isset( $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ] ) ) {
$current_url .= $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ];
}
else {
$current_url .= $_SERVER[ ‘SERVER_NAME’ ];
}I’ve made thanks to you on the plugin front page.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] Parse error: syntax error, unexpected T_STRINGHi,
WP Cassify plugin require at least PHP version 5.3.1. See requirement :
This is because i use php namespaces in my code. Namespaces are only supported from 5.3 :
http://php.net/manual/en/language.namespaces.basics.php.I would advise you to upgrade your php version. Another reason is for security concerns.
I’m sorry but i can’t adapt my code because this will require a rewrite of all plugin code.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] Parse error: syntax error, unexpected T_STRINGHi,
Well, I think it’s not an error syntax in my plugin because it works on your local wordpress system.
Can you give me more information on your production environment : OS version, Apache version, PHP version, and mostly the list of wordpress enabled plugins on your production system.
It seems to be an incompatibility with another plugin or a problem with your production configuration.Best regards.
Forum: Plugins
In reply to: [WP Cassify] Error : User account does not exists in WordPress database !Thanks for your feedback.
Forum: Plugins
In reply to: [WP Cassify] Error : User account does not exists in WordPress database !Hi,
In CAS protocol version 3.0, CAS validate URL ends with ‘/p3/serviceValidate’. You can see documentation here : http://jasig.github.io/cas/4.1.x/protocol/CAS-Protocol.html.
So it seems that you CAS server does not support CAS protocol version 3.If you want remove “p3” from Admin UI, you have just to set ‘CAS Version protocol’ to ‘2’.
Keep me informed if it solved the problem.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] Error after entering username and password in CAS login screen.Please update to new version 1.5.8 which solve the problem.
Forum: Plugins
In reply to: [WP Cassify] Last version of WP-Cassify break loginPlease install update to new-version (1.5.8).
Forum: Plugins
In reply to: [WP Cassify] How to a specify the correct CA certificateOk, I close the ticket.
Forum: Plugins
In reply to: [WP Cassify] How to a specify the correct CA certificateOk, I close the ticket.
I will rewrite new plugin version as the previous version using php-cURL functions. So we will have more control on SSL webrequest configuration.
Originally, i replaced php-cURL functions by native WordPress function wp_remote_get to delete plugin php5-curl dependency. But, it’s not a good idea.So, I back off.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] How to a specify the correct CA certificateOk, thanks for stacktrace.
Ok, patch the function like this while new version of plugin are being released :
public static function wp_cassify_do_ssl_web_request( $url, $ssl_cipher ) {
if (! function_exists ( ‘curl_init’ ) ) {
die( ‘Please install php cURL library !’);
}$ch = curl_init();
curl_setopt( $ch, CURLOPT_HEADER, false );
curl_setopt( $ch, CURLOPT_URL, $url ) ;
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 1);//curl_setopt( $ch, CURLOPT_USERAGENT,’Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13′ );
curl_setopt( $ch, CURLOPT_SSLVERSION, 0 );if ( ( defined( ‘WP_DEBUG’ ) ) && ( WP_DEBUG == true ) ) {
curl_setopt( $ch, CURLOPT_VERBOSE, true );
}$response = curl_exec( $ch );
if( curl_errno( $ch ) ) {
if ( ( defined( ‘WP_DEBUG’ ) ) && ( WP_DEBUG == true ) ) {
$info = curl_getinfo( $ch );
die( ‘Curl error: ‘ . curl_error( $ch ) . print_r( $info, TRUE ) );
}
else {
die( ‘Curl error: active WP_DEBUG in wp-config.php’);
}
}curl_close( $ch );
return $response;
}