0

I'm trying to do a password redirect on my company's page, but on some computers it works, and some it doesn't. It proceeds on a wrong password. All the computers are using Chrome. credit to this page, for getting my started. Thank you

<html>
<body>

<div class="wrapper">

<!--            **** video file goes here   ****-->
        <form class="form1" action="Tyler-Lefko-Master.mp4">

            <div class="formtitle">
                <h1>Enter Your password to proceed</h1>
            </div>

            <div class="input nobottomborder">

                <div class="inputcontent">
                    <input type="password" id="password" /><br />
                </div>
            </div>

            <div class="buttons">
                <input class="orangebutton" type="button" value="Proceed" onclick="checkPassword()" />
            </div>
        </form>
    </div>
</body>
</html>


   <script>
  function checkPassword(){

//              ****     passord here   *****  (after == , inside quotes)
      if(document.getElementById('password').value == 'tyler123'){


//        alert('Correct Password!'); 
      location.href = "Tyler-Lefko-Master.mp4";
        return true;  
     } else {
     alert('Wrong Password!');
      return false;
    }
   }
  </script>
warlock257
  • 29
  • 4
  • Well your password mechanism can easily be overridden by anybody who looks at the page source. What is it that you know about the systems where it doesn't work? – Pointy Sep 04 '18 at 16:57
  • Your password check is horrible, FYI. It can be easily bypassed by using inspect element, view source, curl, etc. on your page and looking at your code that checks for the password value. – Rubydesic Sep 04 '18 at 17:13
  • Good call about bypassing the password. I'll look into a better way in the future, I just need the page working, asap. I don't see any pattern on computers that work / vs ones that bypass the password. All windows, all using Chrome. – warlock257 Sep 04 '18 at 17:20
  • Thanks again for the tips. I'm using PHP instead of javascript, which solved my insecurity issue (hopefully), and made it work across all devices. – warlock257 Sep 04 '18 at 19:42

0 Answers0