views:

574

answers:

4

I'm currently working on a PHP OpenID provider that will work over HTTPS (hence SSL encrypted).
Is it wrong for me to transmit the password as plain text? HTTPS in theory, cannot be intercepted, so I don't see anything wrong. Or is this unsafe at some level and I'm failing to see this?

+8  A: 

If HTTP is disabled, and you only use HTTPS, then you're not really transmitting the password as plain text anyway.

Can Berk Güder
+8  A: 

It is safe. That's how the entire web works. All passwords in forms are always sent in plain text, so its up to HTTPS to secure it.

Eduardo Scoz
Minor nitpick: some login forms use JavaScript to hash the password instead of sending it plain text.
Thorarin
@Thorarin if they truly hash it, that means the server is storing the password in plain text so it can hash with the same salt to verify. Ick! Sending the password in ssl wrapped text is better, as the server does not then need to store the password in plain text.
DGM
@DGM: double hashing is also an option, so plain text passwords are not strictly necessary.
Thorarin
+5  A: 

You still need to make sure you send it via POST request, not GET. If you send it via GET request, it could be saved in plaintext in the user's browser history logs or the webserver's access logs.

Andrew Medico
+1  A: 

The other posters are correct. Now that you're using SSL to encrypt the transmission of the password, make sure you're hashing it with a good algorithm and salt so it's protected when it's at rest, too...

grossvogel
Yes, I realize this, thanks, I was merely referring to the transmission here.
Hugo