javascript - Submitting passwords via ajax -


given following scenario: have html form changing account's password. looks this:

currentpassword:   __________________ newpassword:       __________________ newpasswordagain:  __________________ 

we want send request via ajax call. if send , leave our computer (without logging out , staying on exact same page) open webkit inspector (or firebug) , see this:

http://cl.ly/3y213w1q0u2y2e251k0o

what solution making more secure? possible using ajax call here or better use "normal" html form reloads whole page after sending?

the author not interested in encrypted connections here. may doing already. wants able hide password (and username) 1 has access computer, , can open inspector tools view networking occurred on page.

one of simplest things refresh page in case authentication succeeded.

something should refresh page whenever user pressed "log out". should clear previous network data.

the less options encrypting, obfuscating , hashing password prior sending it.

hashing password on client-side not ideal because prevents use of hashed passwords keys on server-side (think hmac). hmac'd passwords best, because key kept on filesystem whereas salt kept on database. cracking password hash requires rather solid access system.

obfuscating , encrypting password can reversed. if sees login request on webkit inspector, might interested in spending time undress defenses.

i highly recommend refreshing page @ point avoid problem entirely. other options not seem good.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -