perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject Re: Embperl problem?
Date Tue, 08 Oct 2002 22:26:22 GMT
At 5:22 PM -0400 10/8/02, Justin Harrison wrote:
>Hi!
>
>I am having a small difficulty.
>
>When a user loads a page it checks for certain conditions. If these
>conditions are not met, it redirects the user with this code:
>
>[- $redirecturl = $ENV{HTTP_HOST} . $ENV{REQUEST_URI} -]
>
>[- $http_headers_out{'Location'} =
>"http://whatever/script2.embperl?redirect=http://$redirecturl" -]

You are going to want to url encode $redirecturl to do that safely. 
Something like:

SWC::WebUtil::RedirectTemp("/login.html?redirect=" . 
uri_escape($ENV{REQUEST_URI}, '^-A-Za-z0-9./_'));

-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message