passwords in the source?

Discussion in 'ASP General' started by jp2code, Oct 16, 2007.

  1. jp2code

    jp2code Guest

    I've got some files that are not very sensitive. Mostly history files from
    email sessions using our contact forms.

    I'd like to password protect these files so that if someone happened to get
    a link to it, they couldn't start passing it all around for anyone to read,
    and I certainly wouldn't want the link to find its way into a Google search!

    I've thought about creating a password string that I could hold in the <%
    Code (Text):
     %> portion of my .asp pages. Then, if someone tries to open a history
    file, they are first prompted for a password. If it matches what is in the
    <% [code] %> section, they get in.

    I just feel like my password is left out in the clear if I include it as
    part of the asp code.

    Is this way ok, or bad?

    Is there a better way?

    What is a good, simple way to implement this? If someone knows of an example
    application somewhere, I'd be happy to see that link.
     
    jp2code, Oct 16, 2007
    #1
    1. Advertisements

  2.  
    Anthony Jones, Oct 16, 2007
    #2
    1. Advertisements

  3. jp2code

    jp2code Guest

    No, it is a hosted site. The server is not mine.
     
    jp2code, Oct 16, 2007
    #3
  4. jp2code

    Evertjan. Guest

    jp2code wrote on 16 okt 2007 in microsoft.public.inetserver.asp.general:
     
    Evertjan., Oct 17, 2007
    #4
  5. jp2code

    jp2code Guest

    I modified your code just a little, but that worked great!

    Special thanks for the meta tag! I never would have thought to look there.

    Thanks a lot!
     
    jp2code, Oct 17, 2007
    #5
  6. You should also use robots.txt (Google for it). Understand that
    misbehaving robots may not follow directives, so it IS a very good idea
    to check server side. You can also do something like:

    <a href="http://www.example.com" rel="noindex, nofollow">Some offsite
    URL I want to give to my visitors, but don't want robots to follow</a>

    Google and Slurp follow the above directive as well as robots.txt and
    meta.
     
    Adrienne Boswell, Oct 18, 2007
    #6
  7. jp2code

    jp2code Guest

    Thanks! I have implemented that as well.
     
    jp2code, Oct 18, 2007
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.