Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Transerring User session to SSL link

Quote Reply
Transerring User session to SSL link
Hi There,

For numerous reasons, I am trying to get a user session transferred from http:// to https://

But the problem is that the cookies don't transfer when user_sessions is set to cookies, (the SSL path uses the same files but under a different domain name) and the when the user_sessions are set to URL, the template parser doesn't recognize the URL from build_root_url to set the d=1&s=sessionid so it has to be set manually, but upon return to the homepage, the session id gets lost and seeing as how this system is cookies or URL not cookies and URL, it's impossible to allow someone to go back and forth between http:// and https://

This was possible to do in LinksSQL 1.x as it worked with both session and cookies.

Does anyone have any suggestions on how to go back and forth between the two?

Does GT have any plans to add a secure_root_url paramater to make this easier?

thanks in advance for any suggestions.

peace.

Quote Reply
Re: [klangan] Transerring User session to SSL link In reply to
Hi,

If the domains are the same, or a prefix of each other (i.e. cookie is set on domain.com, secure server is secure.domain.com), it should be able to work.

If the secure server is on a different domain, it must be passed via URL. You could make your link to the SSL server have a global:

user_session =>
sub { return GT::CGI->cookie('s'); }

and then put <%user_session%> in the URL?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Transerring User session to SSL link In reply to
Hi,

another question, how can I set a cookie in a global,
something like

user_session =>
sub {
my $non-user-session = rand(10000000);
write-cookie GT::CGI->cookie('$non-user-session');
return $non-user-session;
}

Thanks,
Christian
Thanks a lot for your help,
Christian

Quote Reply
Re: [cwschroeder] Transerring User session to SSL link In reply to
Hi,

Simple answer, is that you can't. You would have to either do it on a hook, or in page.cgi (before the main codes are run)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!