password

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roger Judd

    #1

    password

    Hello,

    I need the JavaScript code for a low security password that I can put into
    my homepage
    so only club members can access certain pages of info.

    Can anyone give me an example please
    My e-mail address is roger.judd@ukga teway.net
    Many thanks
    Roger


  • David Dorward

    #2
    Re: password

    Roger Judd wrote:[color=blue]
    > I need the JavaScript code for a low security password that I can put into
    > my homepage so only club members can access certain pages of info.[/color]

    There are two ways to do this in JavaScript.

    * The really ineffective way:

    Ask the user for a string.
    Compare that string to one placed in the JavaScript.
    Redirect if the strings match.

    Major problem: The user can look at the source and go to the URI.

    * The ineffective way:

    Ask the user for a string.
    Go to http://something.or.other + string + .html

    Thus turning the whole password thing into a complicated way of saying:
    "This URL here... its secret. Don't tell anyone, 'k?"

    If you want password protection, you need a server side tool. Forget
    JavaScript (unless you are one of those very rare people using server side
    JavaScript [e.g. ASP+JScript]).

    --
    David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is

    Comment

    • Andrey

      #3
      Re: password

      Roger Judd wrote:[color=blue]
      > Hello,
      >
      > I need the JavaScript code for a low security password that I can put into
      > my homepage
      > so only club members can access certain pages of info.
      >
      > Can anyone give me an example please
      > My e-mail address is roger.judd@ukga teway.net
      > Many thanks
      > Roger
      >[/color]

      Where are you going to store the password? If on the server, then you need a server side tool which
      will check the entered password on the postback.

      My advise - don't mess with Javascript for that - you CAN'T do any reliable protection if it's on
      client's side - even if you "hide" the password in another .js file, client can anyway see it,
      looking in the page source

      WYGL
      Andrey

      Comment

      • PDannyD

        #4
        Re: password

        "Roger Judd" <roger.judd@ukg ateway.net> wrote in message
        news:41662b5c$1 _2@mk-nntp-2.news.uk.tisca li.com[color=blue]
        > Hello,
        >
        > I need the JavaScript code for a low security password that I can put
        > into my homepage
        > so only club members can access certain pages of info.[/color]

        Without using any stored passwords or server-side scripts you will be
        needing an encrypt/decrypt key.

        First encrypt the text using some random key and give this key to your
        members.
        The encrypted text can then be cut-n-pasted into the live webpage.
        If any visitor doesn't give the correct decryption key then all they see is
        gibberish. The benefit is that you don't store the password or readable data
        anywhere, it's all decrypted client-side.

        There is a little javascript which will encrypt/decrypt text. It uses the
        same key for both and isn't secure enough for something like online shopping
        but it'll do what you need.

        When I'm back at work on Monday I'll find the link and post it as a reply to
        this message. I might even knock up a test page if I'm feeling kind.


        Comment

        • Danny@Kendal

          #5
          Re: password

          "PDannyD" <dan1970@REMOVE THISBITscenicpl ace.freeserve.c o.uk> wrote in
          message news:ck6kq9$o1a $1@news7.svr.po l.co.uk...[color=blue]
          > "Roger Judd" <roger.judd@ukg ateway.net> wrote in message
          > news:41662b5c$1 _2@mk-nntp-2.news.uk.tisca li.com[color=green]
          > > Hello,
          > >
          > > I need the JavaScript code for a low security password that I can put
          > > into my homepage
          > > so only club members can access certain pages of info.[/color]
          >
          > Without using any stored passwords or server-side scripts you will be
          > needing an encrypt/decrypt key.[/color]

          Here's a link to the script I mentioned from my home account.



          Download the script on the above page and have fun.


          Comment

          • Philip Ronan

            #6
            Re: password

            On 11/10/04 10:28 am, Danny@Kendal wrote:
            [color=blue]
            > Here's a link to the script I mentioned from my home account.
            >
            > http://javascript.internet.com/passw...ncryption.html
            >
            > Download the script on the above page and have fun.[/color]

            Oh no. Not another Javascript "password" system :-(

            Whoever wrote this script can't even spell Vigenère properly.

            --
            Philip Ronan
            phil.ronanzzz@v irgin.net
            (Please remove the "z"s if replying by email)


            Comment

            • Roger Judd

              #7
              Re: password


              Thank you for the information regarding my password problem

              Thanks
              Roger


              *** Sent via Developersdex http://www.developersdex.com ***
              Don't just participate in USENET...get rewarded for it!

              Comment

              Working...