8

I'm doing a login form that uses jquery to pass data from the form to the script and back. I've noticed the email and password are being sent as plain readable text. I also noticed that in other site like this very one, or gmail or others, the login info isn't readable like mine is. How can I do this? Somehow, sending this info as plain text doesn't look very... professional.

Screen Capture FireBug

Marvo
  • 17,845
  • 8
  • 50
  • 74
Norman
  • 6,159
  • 23
  • 88
  • 141
  • 3
    If not as plain text, how are they sent? What do they look like? Unless you use https (which you _should_ do for logins!!!) they will be sent in plain text. Some sites may base64 encode before sending, but that amounts to little more than obfuscation. https will protect it. – Michael Berkowski Dec 19 '12 at 03:33
  • 3
    Use [SSL](http://en.wikipedia.org/wiki/Secure_Sockets_Layer). Set up `https:` on your server. – wallyk Dec 19 '12 at 03:33
  • That's exactly what SSL _encryption_ is for. – Sparky Dec 19 '12 at 03:34

1 Answers1

6

you have several options here:

  1. Use HTTPS protocol to send the login informations.
  2. You can hash/encrypt your login info on the client side, upload it/process the form, and decrypt and process the login info on your server. SO have several Q/A answers regarding this process:

However, options #2 is not really an options, if the encryption key are also submitted in plain text over the internet.

Community
  • 1
  • 1
ariefbayu
  • 21,849
  • 12
  • 71
  • 92