Alain-Aymerick FRANCOIS
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Cassify] Login destinationHi,
I think it’s side effect due to Paid Memberships Pro plugin. Because, when you try to access page wich require an authentication, WP Cassify redirect on page where you come from. Callback url is passed to CAS server with serviceUrl attribute.
Maybe Paid Memberships Pro plugin has hooks wich redirect on wp-login page and are fired before WP Cassify.
When you’re redirected to CAS Server, what’s value have you in serviceUrl attribute in url ? If it’s not mysite.com/desired/page, that would say that your membership plugin seems to perform a redirect on wp-login.php page before WP Cassify.
Best regards.
- This reply was modified 9 years, 9 months ago by Alain-Aymerick FRANCOIS.
Forum: Plugins
In reply to: [WP Cassify] Latest update causing failed authenticationHi,
Thanks for reply. I’ve integrated your fix iun 1.9.8. Keep me informed if it works correctly with 1.9.8.Best regards.
Forum: Plugins
In reply to: [WP Cassify] How to test?Hi,
You can’t log back if CAS authentication fails. So use mixed authentication (CAS or Classic WordPress Authentication).
So you can still log in with classic WordPress Auth if you can’t via CAS. Look at this page below to build authentication form bypassing CAS Auth.
https://wpcassify.wordpress.com/getting-started/
In settings UI, you can check an option to disable CAS authentication. So, WP Cassify is not fired.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] CAS Authentication failed !Hi,
I don’t understand why http/https is not appending because i use SERVER variables that you’ve communicated to me before to make the test and build url. (ie. $_SERVER[ ‘HTTP_HOST’ ],$_SERVER[ ‘HTTP_X_FORWARDED_PORT’ ], $_SERVER[ ‘HTTP_X_FORWARDED_PROTO’ ]).
So, i’m very sorry but i can’t solve your problem.
If you want to say where the problem come from, you must use error_log function inside code to debug.
In your wp-config.ini :
@ini_set(‘display_errors’,’Off’);
@ini_set(‘log_errors’,’On’);
@ini_set(‘error_log’,’/var/www/your-website/phperrors.log’);Then insert error_log inside code :
$current_url = $_SERVER[ 'HTTP_HOST' ]; error_log( "after HTTP_HOST " . $current_url);And so on.
if ( $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] == 'https' ) { $current_url = str_replace( "http", "https", $current_url ); } error_log( "after HTTP_X_FORWARDED_PROTO " . $current_url);`
Best regards.
Forum: Plugins
In reply to: [WP Cassify] PHP warning in 1.9.6 on PHP 7Hi,
Thanks for the fix, i integrate in next release.
On the other hand, i’m very sorry but i don’t want put my plugin on github, i prefer stay on WordPress.org platform only. It is a strategic decision on my part.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] CAS Authentication failed !Hi,
In file classes/wp_cassify_utils.php, replace wp_cassify_get_current_url as below. Make all tests you need. Then, keep me informed and if you’ve not bad behaviour with this code, i can integrate this fix in next release :
public static function wp_cassify_get_current_url( $wp_cassify_default_wordpress_blog_http_port = 80, $wp_cassify_default_wordpress_blog_https_port = 443 ) { $current_url = ( @$_SERVER[ 'HTTPS' ] == 'on' ) ? 'https://' : 'http://'; // 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' ]; } if( ( $_SERVER[ 'SERVER_PORT' ] != $wp_cassify_default_wordpress_blog_http_port ) && ( $_SERVER[ 'SERVER_PORT' ] != $wp_cassify_default_wordpress_blog_https_port ) ) { $current_url .= ':' . $_SERVER[ 'SERVER_PORT' ]; } // Specific use case configuration for WordPress hosted on nginx behind AWS loadbalancer. if ( isset( $_SERVER[ 'HTTP_HOST' ] ) && isset( $_SERVER[ 'HTTP_X_FORWARDED_PORT' ] ) && isset( $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] ) ) { $current_url = $_SERVER[ 'HTTP_HOST' ]; if( ( $_SERVER[ 'HTTP_X_FORWARDED_PORT' ] != $wp_cassify_default_wordpress_blog_http_port ) && ( $_SERVER[ 'HTTP_X_FORWARDED_PORT' ] != $wp_cassify_default_wordpress_blog_https_port ) ) { $current_url .= ':' . $_SERVER[ 'SERVER_PORT' ]; } if ( $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] == 'https' ) { $current_url = str_replace( "http", "https", $current_url ); } } $current_url .= $_SERVER[ 'REQUEST_URI' ]; return $current_url; }Best regards.
Forum: Plugins
In reply to: [WP Cassify] CAS Authentication failed !I think you’ve not good nginx reverse proxy configuration because $_SERVER[ ‘HTTP_X_FORWARDED_HOST’ ] is missing.
Forum: Plugins
In reply to: [WP Cassify] Name of the service validate servlet option not saving correctlyHi,
I close ticket cause i answered to your question.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] Bypass querystring being added to logout redirectHi,
This problem is finally solved in 1.9.6 release. Upgrade to this version.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] CAS Authentication failed !Hi !
Have you done the test for http://www.somedomain.com/mockup/test2.php or https://www.somedomain.com/mockup/test2.php ?
I search what’s php server variables i should use to build callback service url if you’re behind a proxy.
I have already experienced this problem and i was thinking i’ve solved this problem but obviously not :
https://wordpress.org/support/topic/error-beyond-a-reverse-proxy?replies=2Best regards.
Forum: Plugins
In reply to: [WP Cassify] Bypass querystring being added to logout redirectHi,
Thanks very much for the feedback ! I integrate your fix to check if WordPress run in multisite mode. I will publish new version tomorrow.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] CAS Authentication failed !Hi,
Okay, thanks for this informations. I know the source of the of the problem. But i need your help to solve the problem because i’ve not aws loadbalancer.Create test.php behind your loadbalancer with this code below and send me the output :
<? echo print_r( $_SERVER ); ?>Best regards.
Forum: Plugins
In reply to: [WP Cassify] Bypass querystring being added to logout redirectHi,
Please upgrade to 1.9.5 and keep me informed if it solve your problem.
Best regards.
Forum: Plugins
In reply to: [WP Cassify] CAS Authentication failed !Hi,
This is because WP Cassify can’t parse xml response given by CAS server to extract user id. You can enable debug option in plugin admin panel to analyse last CAS XML response. Then you can understand why it doesn’t work.
Is your CAS server compatible with CAS protocol version 3 ? Have you tried to turn CAS protocol version to 2 ?
Best regards.
Forum: Plugins
In reply to: [WP Cassify] How can I add my CAS configuration Hardcoded.I think around mid october.
Best regards.