I got it! Within the wpcas.php
file inside of the wpCAS
plugin folder, lines 85-123 detail the actual login function of wpCAS. Lines 104 & 108 detail specifically on how wpCAS redirects you to the admin page:
104:
wp_redirect( preg_match( '/^http/', $_GET['redirect_to'] ) ? $_GET['redirect_to'] : site_url( $_GET['redirect_to'] ));
108:
wp_redirect( site_url( '/wp-admin/' ));
However, this results (for reasons unknown to me) in a redirect loop of DOOM. Thanks to this tip, however (many thanks to Mr. Luigi Balzano), I found a solution. Change the wp_redirect
functions on these two lines to wp_safe_redirect
, like so:
104:
wp_safe_redirect( preg_match( '/^http/', $_GET['redirect_to'] ) ? $_GET['redirect_to'] : site_url( $_GET['redirect_to'] ));
108:
wp_safe_redirect( site_url( '/wp-admin/' ));
This kicked me out of the redirect loop of DOOM.
The plugin, despite being two years old, still works beautifully with WordPress version 3.5.1 and below.
Hope this helps you wpCAS vagrants!