Gossamer Forum
Home : Products : DBMan : Installation :

Upload file with NO extension

Quote Reply
Upload file with NO extension
Hi is it possible to upload a file that does not have a file extension? If yes how so?

Reena
Quote Reply
Re: Upload file with NO extension In reply to
I've used the multi-file upload mod and in it there is a reference to something like $ALLOWED_EXT. Try removing the extensions from that list and see what happens. If that doesn't work try removing (or #'ing out) the section about:

unless ($filename =~ /$ALLOWED_EXT/) {
$ALLOWED_EXT =~ s/\\//g;
$ALLOWED_EXT =~ s/\$//g;
@ext = split (/\Q|\E/o,$ALLOWED_EXT);
$ALLOWED_EXT = join(" or ",@ext);
return "Only files with the following extension(s) are allowed: $ALLOWED_EXT";
}

Once again, this is from the multi-upload mod so it may not match your syntax, but the important part is the "logic" behind it all.

Ps: Could this allow some kind of horrible security breach?

Anway... Good Luck!

Quote Reply
Re: Upload file with NO extension In reply to
In Reply To:
Ps: Could this allow some kind of horrible security breach?
Probably, as then anything will be uploaded including vbs exe com etc...

Maybe better to use:
Code:
if ($filename =~ /\.(vbs|com|exe|bat)$/i) {
return "Bad file!";
}
Installations:http://www.wiredon.net/gt/