Re: CGI - Email Forms

2005-12-07 Thread Bill Stephenson


On Dec 6, 2005, at 1:43 PM, [EMAIL PROTECTED] wrote:

What tests must be in place in order to keep your perl scripts from 
being hijacked from spammers? Any help would be greatly appreciated.


For forms that send email, you don't want to let the user enter a To, 
CC, or BCC address. This should be hard coded into your script. If you 
must let the user send email to an address they input you should make 
them enter a unique user name and password to login to use the script. 
I'm sure there are other things to be considered depending on how the 
script will be used, but these are basic measures you should take.



Kindest Regards,

--
Bill Stephenson


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




Hi, strange problem on calculation

2005-12-07 Thread webmaster
Hi,

I don't know why the result of my calculation doesn't make sense!


foreach('0.43','-0.12','-0.08','-0.17','-0.06') {
   $value = $value + ($_);
}
print $value . br;

Value = -2.77555756156289e-17
Should be 0.00


My Perl Version is:
perl -V
Summary of my perl5 (revision 5 version 8 subversion 4)



Mit freundlichen GrĂ¼ssen
Ihr echtwahr.Webmaster


http://www.echtwahr.de
http://www.echtwahr.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: Hi, strange problem on calculation

2005-12-07 Thread Owen Cook

On Wed, 7 Dec 2005 [EMAIL PROTECTED] wrote:

 Hi,
 
 I don't know why the result of my calculation doesn't make sense!
 
 
 foreach('0.43','-0.12','-0.08','-0.17','-0.06') {
$value = $value + ($_);
 }
 print $value . br;
 
 Value = -2.77555756156289e-17
 Should be 0.00


What is the difference between -2.77555756156289e-17 and 0.00?

It's all to do with the way numbers are represented in computers.

Do a perldoc -f sprintf and have a read.


Owen


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




Re: CGI - Email Forms

2005-12-07 Thread David Dorward
On Tue, Dec 06, 2005 at 02:37:18PM -0600, Bill Stephenson wrote:

 What tests must be in place in order to keep your perl scripts from 
 being hijacked from spammers? Any help would be greatly appreciated.
 
 For forms that send email, you don't want to let the user enter a To, 
 CC, or BCC address.

Nor should you allow new lines ...

$subject = User entered data with\nBCC: spam victim [EMAIL PROTECTED]

-- 
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