I'm not sure what you mean exactly by clean URLs. You mean if I done any other modifications to the core code?
For your info, I just made a test with latest master version (16.04dev) with only the following modifications and I was able to reproduce the problem :
The only thing I see that could be the source of the problem, other than the Mahara / CAS plugin, would be the CAS client itself. That is why I wanted to know if any other CAS users can reproduce the problem.
Thanks!
]]>
Hmm, do you have any other redirects in place like clean urls thay maybe causing the redirect looping?
]]>
Unfortunately I just tried the full URL and still the same loop after the logging in with CAS.
I already have the master version from patrick pollet repo with changes you made.
Note that, as I said in my initial post, this is really specific to pages with query string in the URL (Pages, groups, forums, posts etc).
Thanks again!
]]>Ok first off I wasn't quite clear when I said full url. What I mean was you would have:
$cfg->externallogin = 'https://mymahara//auth/cas/index.php?wantsurl={shorturlencoded}'
Also I experienced this issue and needed to alter the cas/index.php when I had the redirect problem, can you check that your version has these changes to it:
Let me know if any of that helps.
Cheers
Robert
]]>
I just tried externallogin with the following URL and I still have the same redirect loop :
$cfg->externallogin = '/auth/cas/index.php?wantsurl={shorturlencoded}'
Can you check with your clients that uses CAS if they can reproduce the problem? Here are the steps :
Thanks a lot!
]]>
Mhh. We haven't experienced this problem on a site where we have CAS. Would be good to hear from others who are using the plugin if they experience your problem and if the plugin should be changed.
Cheers
Kristina
]]>
I'm a bit clueless about a weird problem we have in our Mahara instance which leads to a redirect loop error when authenticating with CAS (non-core plugin).
Here's the problem:
Here's what I found:
diff --git a/htdocs/auth/lib.php b/htdocs/auth/lib.php
index b4d5a39..e938e11 100644
--- a/htdocs/auth/lib.php
+++ b/htdocs/auth/lib.php
@@ -1132,7 +1132,8 @@ function auth_draw_login_page($message=null, Pieform $form=null) {
$externallogin = get_config('externallogin');
if ($externallogin) {
- $externallogin = preg_replace('/{shorturlencoded}/', urlencode(get_relative_script_path()), $externallogin);
+ $shorturl = preg_replace('/(?|&)login/', '', get_relative_script_path());
+ $externallogin = preg_replace('/{shorturlencoded}/', urlencode($shorturl), $externallogin);
$externallogin = preg_replace('/{wwwroot}/', get_config('wwwroot'), $externallogin);
redirect($externallogin);
}
Mahara instance configurations:
I was wondering if anyone has any clues about that and/or are experiencing the same problems? Do you think the proposed fix makes sense or should it be elsewhere in the code? Some feedbacks would be great before submitting something to the bug tracker.
Your help would be much appreciated! Thanks in advance!
J-P
]]>