Stop if request method is GET

This commit is contained in:
qorg11 2020-11-15 02:48:42 +01:00
parent 59ae705c09
commit ac4c841e64
No known key found for this signature in database
GPG Key ID: 343FC20A4ACA62B9
1 changed files with 1 additions and 2 deletions

View File

@ -20,7 +20,6 @@ use Time::HiRes qw(gettimeofday);
my $q = CGI->new; my $q = CGI->new;
my $filename = $q->param('file'); my $filename = $q->param('file');
# TODO: fix 502
my $upload_dir = "files/"; my $upload_dir = "files/";
print $q->header(); print $q->header();
@ -32,7 +31,7 @@ our $MAX_SIZE = 1024*1024*10; # Change for your size
our $MAX_SIZE_MB = $MAX_SIZE / 1024 / 1024; # Don't change this our $MAX_SIZE_MB = $MAX_SIZE / 1024 / 1024; # Don't change this
our @not_allowed_extensions = qw(sh out exe); our @not_allowed_extensions = qw(sh out exe);
if($filename eq "") if($filename eq "" || $ENV{REQUEST_METHOD} eq "GET")
{ {
print("What are you looking for?"); print("What are you looking for?");
exit; exit;