auth_key api for different situations#2090
auth_key api for different situations#2090connortechnology merged 4 commits intoZoneMinder:masterfrom
Conversation
|
ok, so |
|
Our API JSON setup leaks logs/warnings from other functions. Specifically, Output produced:
|
|
I don't think you need to do all the Config lookups. I think you can use the defines just like in the regular UI. If auth=plain, then we store the password in the session, unhashed. If we are using auth=hashed then we store passwordHashed in the session as the hashed password. If we switch auth methods after logging in from plain to hashed, then the session will not have the unhashed password in the session. auth=plain is inherently unsafe. We should really get rid of all of it, and use actual public key cryptography to encrypt a hash. |
#2089
@connortechnology - take a look.
Seems to work for me, but I noticed that
User.Passwordactually stores the MD5 encoded password, not the real password. So&user=&pass=pbly won't work - I suppose we need to load some other model for the password?