in reply to Re: prevent perl script running from browser
in thread prevent perl script running from browser
That looks scary.
I've already explained some of the problems with the first few lines of the code. Let me add some more notes for the remaining part.
(Note that I commented out use CGI::Carp qw(fatalsToBrowser); to avoid duplicated error messages.)>perl -cw -Mstrict -T 1200474.pl main::get_date() called too early to check prototype at 1200474.pl lin +e 76. main::get_date() called too early to check prototype at 1200474.pl lin +e 104. Global symbol "$to" requires explicit package name at 1200474.pl line +25. Global symbol "$from" requires explicit package name at 1200474.pl lin +e 26. Global symbol "$subject" requires explicit package name at 1200474.pl +line 27. Global symbol "$message" requires explicit package name at 1200474.pl +line 28. Global symbol "$to" requires explicit package name at 1200474.pl line +33. Global symbol "$from" requires explicit package name at 1200474.pl lin +e 34. Global symbol "$subject" requires explicit package name at 1200474.pl +line 35. Global symbol "$message" requires explicit package name at 1200474.pl +line 37. Global symbol "$gpg_path" requires explicit package name at 1200474.pl + line 70. Global symbol "$gpg_options" requires explicit package name at 1200474 +.pl line 71. Global symbol "$gpg_public_key_user_id" requires explicit package name + at 1200474.pl line 72. Global symbol "$gpg_command" requires explicit package name at 1200474 +.pl line 83. Global symbol "$gpg_path" requires explicit package name at 1200474.pl + line 83. Global symbol "$gpg_options" requires explicit package name at 1200474 +.pl line 83. Global symbol "$gpg_command" requires explicit package name at 1200474 +.pl line 84. Global symbol "$gpg_public_key_user_id" requires explicit package name + at 1200474.pl line 84. Global symbol "$gpg_command" requires explicit package name at 1200474 +.pl line 85. Global symbol "$gpg_command" requires explicit package name at 1200474 +.pl line 87. Global symbol "$output_file" requires explicit package name at 1200474 +.pl line 91. Global symbol "$gpg_output" requires explicit package name at 1200474. +pl line 94. Global symbol "$output_file" requires explicit package name at 1200474 +.pl line 98. 1200474.pl had compilation errors. >
I would disable that script NOW. Just remove it from the server, then fix the problems. There are at least three obvious injection problems that need to be addressed, and there is a race condition in encrypting the form data.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: prevent perl script running from browser
by snowchild (Novice) on Oct 02, 2017 at 05:38 UTC | |
by afoken (Chancellor) on Oct 02, 2017 at 15:06 UTC |