For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > August 2004 > Matts Script Arcihve - FormMail.pl v1.92









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Matts Script Arcihve - FormMail.pl v1.92
Simon Harris

2004-08-07, 8:55 pm

Hi All,

I'm trying to upgrade from Matts Script Arcihve - FormMail.pl v1.6 > v1.92
following a request from my webhost re the security weakness in v1.6

v1.6 works fine on the live server, and on my development box (IIS 5.1 with
ActivePerl v5.8.4 build 810)

v1.92 works fine on my developmet box, but on the live server, all I get is:


Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, websupport@demon.net and inform
them of the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error
log.


I'm lost to be honest - I've checked through the script, line by line (As
bet I can with my very limited Perl knowledge!)

I am uploading using ASCII and I have set permissions following the upload
(755) and...have uploaded to the same folder as v1.6

Also - Note that the error occurs when I call the script directly, I am not
yet passing any form data - As mentioned above, v1.92 works fine on my dev
box - If I access it directly, I get what I expect:


Bad Referrer - Access Denied
The form attempting to use FormMail resides at http://localhost/sw/,
which is not allowed to access this cgi script.
If you are attempting to configure FormMail to run with this form, you
need to add the following to @referers, explained in detail in the README
file.
Add 'localhost' to your @referers array.
FormMail V1.92 © 1995 - 2002 Matt Wright
A Free Product of Matt's Script Archive, Inc.


Hope someone can help or offer even something to try! :)

I've tried talking to my web host company - about as useful as a ice cream
fireman :)

Regards,
Simon.

--
-
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!


Simon Harris

2004-08-07, 8:55 pm

And below is some output I managed to get...(Some bits snipped for obvious
reasons)

Redirecting STDERR to STDOUT
Query_String: ''
Path_Info: '<NULL>'
Remote Host: '<NULL>'
Remote Addr: '<snipped>'

Results of stat:
File Owner: '11389'
File Group: '999'

User Data Retrieved:
UserName: '<snipped>'
UID: '<snipped>'
GID: '999'
Directory: '/home/<snipped>'
Sanitize script name: 'xx-sendmail.cgi'
Sanitized to: 'xx-sendmail.cgi'
Sanitize path name: '/cgi-bin/<snipped>/xx-sendmail.cgi'
sanitized to: '/cgi-bin/<snipped>/xx-sendmail.cgi'

Log Request
Opening log file.
Writing log entry.
Closing log file.
Done logging request.

UIDs/GIDs Changed To:
RUID: '11389'
EUID: '11389'
RGID: '999'
EGID: '999'


Output of script follows:
========================================
=============
path: '/cgi-bin/<snipped>/xx-sendmail.cgi'
argv[0]: 'xx-sendmail.cgi'
argv[1]: '<NULL>'
parse error in file /cgi-bin/<snipped>/xx-sendmail.cgi at line 224, next 2
tokens "/(\n|\r)/m || "
Search pattern not terminated in file /cgi-bin/<snipped>/xx-sendmail.cgi at
line 224, next char ^>
Search pattern not terminated in file /cgi-bin/<snipped>/xx-sendmail.cgi at
line 225, next char ^>
parse error in file /cgi-bin/<snipped>/xx-sendmail.cgi at line 246, next 2
tokens "}"
parse error in file /cgi-bin/<snipped>/xx-sendmail.cgi at line 339, next 2
tokens "local $sfname "
parse error in file /cgi-bin/<snipped>/xx-sendmail.cgi at line 358, next 2
tokens "local $fname "
parse error in file /cgi-bin/<snipped>/xx-sendmail.cgi at line 384, next
token "}"
parse error in file /cgi-bin/<snipped>/xx-sendmail.cgi at line 417, next 2
tokens "local $sort_order "
parse error in file /cgi-bin/<snipped>/xx-sendmail.cgi at line 430, next 2
tokens "}"
parse error in file /cgi-bin/<snipped>/xx-sendmail.cgi at line 459, next
token "}"
/cgi-bin/<snipped>/xx-sendmail.cgi has too many errors.


Simon Harris

2004-08-07, 8:55 pm

More useful info (?)...

Web host Perl version:
$RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $ Patch
level: 36

My dev server:
5.008004

This is output from print $]

Simon.


gnari

2004-08-07, 8:55 pm

"Simon Harris" <toomuchspam@makesyoufat.com> wrote in message
news:3JWdnbEFPYNwxIjcRVn-rw@eclipse.net.uk...
> More useful info (?)...
>
> Web host Perl version:
> $RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $ Patch
> level: 36


perl 4 ?

change web host.

you might ask them if they also have a newer perl installed.
sometimes more than one version is installed , for backwards
compatibility reasons (but perl 4 ?). in that case you
might have to change your shebang line to
#!/usr/bin/perl5
or whatever the path is

gnari




Simon Harris

2004-08-08, 8:55 am

> might have to change your shebang line to
> #!/usr/bin/perl5
> or whatever the path is


Gnari,

Well done and thankyou for your help - All working know, following changing
the shebang.
You saved me pulling out whats left of my hair! :)

Simon.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com