On Wed, Sep 8, 2010 at 12:15 AM, Doug Plant <[email protected]> wrote:

>  Hi SDK-Public,
>
> I've written an SSO handler and it has a bad behaviour.
>
> When the SSO handler recognizes a user (by the host IP address) and
> returns the user object, the website (version 4.1.3) flashes the
> user/login page in the browser before redirecting the user to the user's
> requested destination.
>
> I would love to know what is going on with this.
>
> It looks to me that the templates are parsed and the output is generated
> before the SSO handler is invoked. This is based on the unavailability
> of a session variable set in the SSO handler.
>
> It also appears to me that the redirection to the requested page is
> achieved with a client-side redirection - via the "location" header. As
> Andre R. points out, this is the sort of thing that causes hellish
> burning. (http://issues.ez.no/17148)
>

Different issue, but yes. Think one would end up in the 7th
hell dimensions for stuff like that :P


>
> One of the things that prevents any decent work around is that the
> actual URL of the page that is returned (and that contains the
> redirection) is the the URL of the requested page, not user/login or
> user/fooledyoulogin or something.
>
> Has anyone else dealt with this spurious page flash?
>


We stumbled upon this while working on the session stuff, if you look in
ezuser.php, in function instance() you'll find this line in the SSO code:
eZHTTPTool::redirect( eZSys::wwwDir() . eZSys::indexFile( false ) .
eZSys::requestURI(), array(), 302 );

Or in 4.2/4.1 it is probably this for some reason:
eZHTTPTool::redirect( eZSys::wwwDir() . eZSys::indexFile( false ) .
eZSys::requestURI(), array(), 201 );

You can try changing that code to:
eZHTTPTool::redirect( eZSys::wwwDir() . eZSys::indexFile( false ) .
eZSys::requestURI(), array(), 302 );
eZExecution::cleanExit();

We've changed this in 4.4, so please do try it (changing the code) and tell
if it solves the issue or introduces new once.



>
> My current workaround is to hide the login for a few seconds. It sucks
> horribly.
>
> Regards,
>
> Doug Plant
>
> --
> [email protected] | mugo.ca | office: 778-373-6600
>
> --
> Sdk-public mailing list
> [email protected]
> http://lists.ez.no/mailman/listinfo/sdk-public
>
-- 
Sdk-public mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/sdk-public

Reply via email to