CAS redirects to last "page not found" error on login

kevee - March 2, 2009 - 23:22
Project:CAS
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If a user is within our site and hits a resource, say an image, that is not found, then logs out and logs back in again, they get redirected to a "page not found" page with the url of the missing resource from their previous session.

This only occurs if we have the 'Force Redirect on login' option turned on.

#1

metzlerd - March 3, 2009 - 22:53

Can you tell me whether you're using private files or public (does apache handle image files or drupal)?

#2

kevee - March 9, 2009 - 02:14

Good question...
we are using public files. I have tried to turn that opion on and off in our devel environment and can still reproduce the error.

Once I get back home from DrupalCon, I'll start working through the module to find the cause....

#3

metzlerd - March 9, 2009 - 15:12

I'm seeing some occasional behavior somewhat like your seeing. I'm planning a major CAS code sprint in the next month or so, so I'll likely get to it then.

#4

kevee - May 23, 2009 - 01:06
Version:5.x-3.0» 6.x-1.0

Found the problem: the CAS cas_save_page() function sets the session variable 'cas_goto' for every item on the page which is not found, and therefore subsequently overrides the cas_goto page for the currently loaded page. Will look into if this can be overridden by having a custom 404 page and adding it to the exception list of redirected pages.

The module should probably check that the page exists before adding it to the session.

 
 

Drupal is a registered trademark of Dries Buytaert.