[ic] session secure ?

Joachim Leidinger interchange-users@interchange.redhat.com
Tue May 21 16:38:01 2002


Ron Phipps wrote:
> 
> > On Behalf Of Donal H.
> > Sent: Tuesday, May 21, 2002 5:04 AM
> > To: interchange-users@interchange.redhat.com
> > Subject: [ic] session secure ?
> >
> > Hi,
> >
> > How can I determine if I'm in a secure page?
> > I've tried [if session secure] but it always seems to return false and
> > [data
> > session secure] is always blank.
> >
> > Thanks,
> > -Donal
> 
> Create a usertag with these contents:
> 
> UserTag is_secure Routine <<EOR
> sub {
>         return $CGI::secure =~ /^(on|1)$/i ? 1 : 0;
> }
> EOR
> 
> And call it like this:
> 
> [seti secure][is_secure][/seti]
> 
> You can then test if you are secure by checking the value of secure.
> 
> [if scratch secure eq '0']
> This page is not secure
> [else]
> This page is not secure.
> [/else]
> [/if]
> 
> I found this in the archives and cannot remember who contributed it,
> thanks to that person ;)


There is another solution by racke.

[if session shost]
...wow,secure...
[else]
...not secure ...
[/else]
[/if]

ciao

Joachim

-- 
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[leidinger@bpanet.de] 
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de