Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

From HTTP to HTTPS, the sooner the better?

Tags:

security

https

If I have this page in "http://example.com/login" with GET verb:

<form action="https://example.com/login" method="post">
   <input type="text" name="login"/>
   <input type="password" name="pass"/>
   <input type="submit" value="Login"/>
</form>

Is it a security flaw? I mean, the page is HTTP but when sending the data it uses HTTPS. I have read several times that I should require HTTPS already in the login page, but I don't clearly see why.

like image 843
vtortola Avatar asked Nov 17 '25 14:11

vtortola


2 Answers

Yes, it's flawed. What you have is secure as far as it goes, as long as it's your login form the user is seeing.

Because your login form isn't secured, I can come along and substitute my own spoof login form and collect your users' login details, eg. via a man-in-the-middle attack. A login system is only secure if both the login form and the target page use SSL.

Also, it doesn't look secure to the user. Users look for the padlock symbol on the login form, and yours doesn't have one.

like image 171
RichieHindle Avatar answered Nov 21 '25 03:11

RichieHindle


Yes, it is a security flaw.

Since the form is served over HTTP, it is subject to being edited along the way. This edit could be, for example, the additional of JavaScript that sends the credentials to a server that the attacker controls as well as letting the browser log in normally.

like image 31
Quentin Avatar answered Nov 21 '25 04:11

Quentin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!