![]() |
|
Issue loging in from Plugin - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Issue loging in from Plugin (/thread-10950.html) |
Issue loging in from Plugin - jphilbert - 2013-03-26 This might be some kind of security issue but after 2 days I have not been able to track it down. Now it seems that it does not affect everyone but this one install of Zenphoto 1.4.4.3 will not authenticate no matter what I do even with a fresh install. I created a new user and it work temporarily then some how stopped.. Is there any insight that you can give me?function authorize($args) {
} Issue loging in from Plugin - sbillard - 2013-03-26 you can use the But some comments on the code snippet you have posted. is "decode64" supposed to be
Otherwise the code looks right. If you get an empty result form the getAnAdmin it means that there was no database entry that matched your parameters. I suggest you log the input parameters to be sure they are not being corrupted. Issue loging in from Plugin - jphilbert - 2013-03-26 Thank you will try some things..its not my code so I have been going over every thing and cleaning it up. Optimizing and adding new features ...so thank you for the suggestions Issue loging in from Plugin - jphilbert - 2013-03-26 your decode64 questionQuote:function decode64($args) {
Issue loging in from Plugin - jphilbert - 2013-03-26 @sbillard
Not working zp-1.4.4.3
The ONLY significant difference between the 2 is that passhash string any insight on this? Issue loging in from Plugin - sbillard - 2013-03-26 Neither of these hashes look correct. They should be fairly long strings. They are matched against the string in the The first case would work since the empty string will tend to match anything. But of course it should not be empty in the first place. Are the user and password decoded correct? If you set the Issue loging in from Plugin - jphilbert - 2013-03-26 O boy did I get caught in the spam filter smh Issue loging in from Plugin - fretzl - 2013-03-26 Yep, you were. It's retrieved now. Issue loging in from Plugin - jphilbert - 2013-03-26 So studying the debug log and looking at the code again I need some clarification.$_zp_authority->getAnAdmin(array('user=' => $args['loginUsername'], 'pass=' => $hash, 'valid=' => 1));[passhash] changes from 0 and higher depending on some variable (the code makes sense now) but why on my other installation is my passhash 0 and not higher and my password is correct...curious I might have to make some changes to get this to work OR see why the the other instance of Zenphoto operates differently Issue loging in from Plugin - sbillard - 2013-03-26 Take a look at the passwordHash function. You will see that it uses different algorithms depending on the setting for the I might also note that the actual value of this may be different by user, so your code would probably have to check each version (currently 0, 1, and 2) to be robust. This is the code we use to check a logon:
Issue loging in from Plugin - jphilbert - 2013-03-26 coolness figured out the mindset once I took a look at the debug logs .. thanks for the code it should fix me fix the problem quickly .. |