Hi all,
I'm trying to have a file upload utility, and obviously, as part of that
I'm going to need <input> file controls. The problem I have is that when
the user chooses a .exe file, instead of running the submit function, the
browser automatically redirects to a "page not found" page. I'm told there
is some sort of a page directive or something that is producing this, like a
security feature. I know that uploading .exe files can be a security risk,
but I need to be able to do it anyway. I tried using the validateRequest
directive and setting it to false, but that didn't work either. Any ideas?
Thanks, Matt 5 868
Matt,
It isn't possible to require that users place the .exe file in a .zip or
similar?
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Matt MacDonald" <ma******@hotmail.com> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl... Hi all, I'm trying to have a file upload utility, and obviously, as part of that I'm going to need <input> file controls. The problem I have is that when the user chooses a .exe file, instead of running the submit function, the browser automatically redirects to a "page not found" page. I'm told
there is some sort of a page directive or something that is producing this, like
a security feature. I know that uploading .exe files can be a security
risk, but I need to be able to do it anyway. I tried using the validateRequest directive and setting it to false, but that didn't work either. Any
ideas? Thanks, Matt
I certainly could, but I also don't want the browser to crash whenever they
try and upload one. The problem with that is that I can't seem to find a
regular expression that will work to check the filenames ahead of time to
see if they end with anything other than .exe.
"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message
news:10*************@corp.supernews.com... Matt,
It isn't possible to require that users place the .exe file in a .zip or similar?
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche "Matt MacDonald" <ma******@hotmail.com> wrote in message news:uu**************@TK2MSFTNGP12.phx.gbl... Hi all, I'm trying to have a file upload utility, and obviously, as part of
that I'm going to need <input> file controls. The problem I have is that
when the user chooses a .exe file, instead of running the submit function,
the browser automatically redirects to a "page not found" page. I'm told there is some sort of a page directive or something that is producing this,
like a security feature. I know that uploading .exe files can be a security risk, but I need to be able to do it anyway. I tried using the
validateRequest directive and setting it to false, but that didn't work either. Any ideas? Thanks, Matt
Matt,
The following is a regular expression that I use to make certain users are
inputting a valid windows file name. It only allows the extensions you list
at the end to add more just separate them with a pipe "|":
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.mp3|.MP3|.mpeg|.MPEG|.m3u|.M3U)
$
Or to disallow certain file types place each type not allowed in: [^ ] and
again seperate with a pipe:
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+([^.exe]|[^.EXE])$
Good luck!
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Matt MacDonald" <ma******@hotmail.com> wrote in message
news:OB**************@TK2MSFTNGP09.phx.gbl... I certainly could, but I also don't want the browser to crash whenever
they try and upload one. The problem with that is that I can't seem to find a regular expression that will work to check the filenames ahead of time to see if they end with anything other than .exe. "S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message news:10*************@corp.supernews.com... Matt,
It isn't possible to require that users place the .exe file in a .zip or similar?
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche "Matt MacDonald" <ma******@hotmail.com> wrote in message news:uu**************@TK2MSFTNGP12.phx.gbl... Hi all, I'm trying to have a file upload utility, and obviously, as part of that I'm going to need <input> file controls. The problem I have is that when the user chooses a .exe file, instead of running the submit function, the browser automatically redirects to a "page not found" page. I'm told there is some sort of a page directive or something that is producing this, like a security feature. I know that uploading .exe files can be a security risk, but I need to be able to do it anyway. I tried using the validateRequest directive and setting it to false, but that didn't work either. Any ideas? Thanks, Matt
"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message news:10*************@corp.supernews.com... Matt,
Or to disallow certain file types place each type not allowed in: [^ ] and again seperate with a pipe:
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+([^.exe]|[^.EXE])$
this will not work: the re-part [^.exe] means:
"a single character, not in the list '.', 'e', 'x' "
To find an re that will work is fairly difficult. First you need to specify
where the check is done: server-side or client-side, as the re-syntax
differs a lot between those platforms (for client-side you will also need
to check on multiple browsers!)
Hans Kesting
Hans,
Maybe it's just in IE and / or vb.net but the expression is allowing:
c:\test.txt, but does not allow c:\test.exe
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... "S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message
news:10*************@corp.supernews.com... Matt,
Or to disallow certain file types place each type not allowed in: [^ ]
and again seperate with a pipe:
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+([^.exe]|[^.EXE])$
this will not work: the re-part [^.exe] means: "a single character, not in the list '.', 'e', 'x' "
To find an re that will work is fairly difficult. First you need to
specify where the check is done: server-side or client-side, as the re-syntax differs a lot between those platforms (for client-side you will also need to check on multiple browsers!)
Hans Kesting
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: MAK |
last post by:
Hello everyone,
I know how to add images and icons etc to dll file.
What I would like to know is there is a way to add those icons on the forms
during the run time from the dll or to reference it ...
|
by: andrei |
last post by:
Hi Group,
In my program, the user has to be able to add one or more documents (as
files) for one product from the database.
The number of files to be uploaded can vary from 1 to maybe 30-40 and...
|
by: Andy Fish |
last post by:
Hi,
I have an asp.net form with multiple <input type=file> elements on it.
when the form is posted, I get an array of files, but how do can I figure
out which one in the array relates to which...
|
by: FusionGuy |
last post by:
I've created a file uploading handler, implemented as an httpHandler. Each
time I attempt to upload a file, or files, my HttpContext.Request.Files
property never contains the files that were...
|
by: arunairs |
last post by:
Hi,
How would one parse aspx pages? Is there an aspx parser available? I
need to access the individual controls in an aspx page and parse them.
thanks,
Arun
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |