Re: How to disable direct file linkage



On Apr 10, 11:34 am, b...@xxxxxxxxxxx wrote:
I have www pl page that is a survey. When users have have filled the survey the
click a link that takes them to a goodie program (a small exe).

The www page is for examplewww.blahblah.com/survey.pl
and the file iswww.blahblah.com/goodie.exe

Are you sure about those URLs? I get 404:

The requested URL /survey.pl was not found on this server.

Apache/1.3.33 Server at www.blahblah.com Port 80

Please refrain from using other people's domain names in your
examples. Use your domain or a reserved example domain (e.g.
example.com).

The problem is that users can go past the survey and type directly
www.blahblah.com/goodie.exe and get the program.

How would I prevent that?

This has nothing to do with Perl.

Fundamentally if file is directly accessible by a URL you can't stop
people sharing that URL with their friends.

You could make the GCI script actually emit the .exe file directly as
the GCI response but this solution messy. (I'd use File::Copy).

My preferred solution is for the CGI script to emit an _internal_
redirect and then configure the web server to disallow direct access
to the file.

How to configure this in your web server software depends very much on
what web server software you have.

.



Relevant Pages

  • Re: .exe uplpoads
    ... it is impossible for anything on the Web Server to determine ... whether it is an upload or not, thus it is not possible to stop web editors ... allowing upload of .EXE is no biggie. ... >You can use URLScan to disallow .EXE from being accepted ...
    (microsoft.public.inetserver.iis)
  • Local EXE and web server communications
    ... intranet cannot/does not allow. ... I experimented with creating a HTA file, but the exe reference variable ... The other problem with an HTA is it prompts the user twice: ... The web server needs to initiate the call ...
    (microsoft.public.dotnet.languages.vc)
  • Re: remove user exe execute permission
    ... You have .exe etc. files on your Web server: ... * You don't want anonymous internet user to run the files on the ...
    (microsoft.public.windows.server.security)
  • Re: personal web server?
    ... I've used ICQ in years past but have no idea what's ... Is there personal web server software to quickly ...
    (microsoft.public.windowsxp.general)
  • Can one refer to GAC on a server?
    ... the user controls are installed on the client machine ... I want to bypass that and just have the .exe ... from the GAC on the web server. ... The user controls change versions 3 times a year and I want to avoid ...
    (microsoft.public.dotnet.framework.remoting)