changing action with appended key/value pairs in a POST

2005-08-24 Thread Scott R. Godin
I have a multi-stage cgi I'm currently working on, and as I progress thru the 
stages (the form uses POST not GET for reasons of data-size) I was hoping to be 
able to simply add ?step=confirm or ?step=finish to the form action

( -action=$htmlform{action}?step=confirm, ... )

However it's not working, and I'm getting the distinct impression that when the 
action is a POST, CGI.pm ignores anything WRT the uri request line...


Is this true?

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




reading a client file

2005-08-24 Thread Adriano Allora

hi to all,

I need to read a file selected by (and stored in the computer of) users.

My first idea was on uploaded files:

(all variables are sent correctly;
$_ is the name of the file
$file is a relative pathname)

s/.*[\/\\](.*)/$1/;
$file = upnull/.$_;
open(LOCALE,  $file) or die(problema: $!);
binmode LOCALE;
while($file)
{
print LOCALE;
}
close(LOCALE);


I'm curious to know why that script doesn't work and I need to know if 
there's a more sicure way to do it (for instance reading the file 
without copying it on the server...)


thank you all,

alladr


|^|_|^|_|^|  |^|_|^|_|^|
 || ||
 || ||
 ||*\_/*\_/*\_/*\_/*\_/* ||
 |   |
 |   |
 |   |
 | http://www.e-allora.net|
 |   |
 |   |
**


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




$ENV{'HTTP_REFERER'}

2005-08-24 Thread Denzil Kruse
Hi,

I want to know the web site that someone came from,
and so I was planning on reading $ENV{'HTTP_REFERER'}
to figure it out.  How reliable is that?  Do browsers
or other situations block it or obfuscate it?  Is
there another way to do it or any other issues
involved?  I'm using apache on red hat.

Thanks,
Denzil

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: $ENV{'HTTP_REFERER'}

2005-08-24 Thread Wiggins d'Anconia
Denzil Kruse wrote:
 Hi,
 
 I want to know the web site that someone came from,
 and so I was planning on reading $ENV{'HTTP_REFERER'}
 to figure it out.  How reliable is that?  Do browsers
 or other situations block it or obfuscate it?  Is
 there another way to do it or any other issues
 involved?  I'm using apache on red hat.
 
 Thanks,
 Denzil
 

Depends on your definition of reliable. From experience it would seem
most browsers set it pretty reliably.

Having said that, it is just a value passed as part of the HTTP request
so anyone can spoof it at anytime, so relying on it from a security
stand point, well, isn't secure.

I imagine if you are doing something where someone can benefit from
obfuscating it, they will.  If you want to use it for ease of UI
handling (aka redirects, prepopulating fields, marketing metrics) I
think you are safe.

HTH,

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: $ENV{'HTTP_REFERER'}

2005-08-24 Thread David Dorward
On Wed, Aug 24, 2005 at 02:12:56PM -0700, Denzil Kruse wrote:

 I want to know the web site that someone came from,
 and so I was planning on reading $ENV{'HTTP_REFERER'}
 to figure it out.  How reliable is that?

Reliable enough for general interest and for finding some sites with
links to moved pages on your site. Not reliable enough to depend on.

 Do browsers or other situations block it or obfuscate it?

Often. Its an optional header, isn't supposed to be sent when arriving
from an https page, and is munged by a goodly number of personal
firewalls.

  Is there another way to do it

No

-- 
David Dorward  http://dorward.me.uk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response