tbenyon
Forum Replies Created
-
Forum: Plugins
In reply to: [External Login] ssha256Bad news – after reading that example through more thoroughly it is actually doing the same thing I tried in the first place.
This still doesn’t make sense as the hash you have provided does not appear to be base64 encoded string. (
JVCmnFjLqYvJJLPKfhG7a6KFaa6JmrEeg8mhTkYqWIljOGMzZmE1OTlhNjE0NzY5)I’m either missing something but from looking at the file I mentioned earlier, and reading the hash generator solution the string above should be a base 64 encoded string but it is not.
I’m starting to think that this isn’t what is hashing your passwords. I don’t know what to suggest next I’m afraid.
Forum: Plugins
In reply to: [External Login] ssha256Hey @quantumco,
Firstly, your English is incredible! Everything you’ve written has been exceptionally clear. π
So I’ve had a look at that plugin for you and I can see how the hash is being used in
lib/Crypto/SSHA.php:public function checkPassword($password, $dbHash, $salt = null) { $saltedPassword = base64_decode( preg_replace("/" . $this->getPrefix() . "/i", "", $dbHash) ); $salt = substr($saltedPassword, -(strlen($saltedPassword) - $this->getHashLength())); $hash = self::ssha($password, $salt); return hash_equals($dbHash, $hash); }As this is a unique solution I will not be adding it directly to the plugin. However, I am going to try and go out of my way and write you the code for the hook that will integrate with the plugin.
If I succeed, I’d be grateful if you could write a review or even buy me a beer.
Will try and get back to you soon . . .
π
Forum: Plugins
In reply to: [External Login] ssha256Hey Kevin,
Spent some time looking into this for you and unfortunately, it isn’t very clear what this is doing.
I’ve tried to Google around and found a few results like this one that imply this is the process that Mailcow use:
1) Getting the above and removing
{SSHA256}.
2) base 64 decoding the rest
3) Splitting the resulting string in half
4) The second half would be the salt and the first half would be a SHA256 hash of the password and the salt
5) At this point we can validate the password to see if that starting hash is equal to the password entered + the salt and the sha(256) hashed.Unfortunately it doesn’t seem right and step two is where things break down as
JVCmnFjLqYvJJLPKfhG7a6KFaa6JmrEeg8mhTkYqWIljOGMzZmE1OTlhNjE0NzY5isn’t a valid base 64 encoded string.Unfortunately at this point I think you’re going to have to either contact Mailcow for support or go through the code yourself (or pay a developer to do it) to see how the hashes are actually being generated.
If you can find this out I’m happy to try and help you further.
Thanks,
Tom π
- This reply was modified 5 years, 6 months ago by tbenyon.
Forum: Plugins
In reply to: [External Login] ssha256Hey @quantumco,
I may be able to help you with this.
Could you please create a new user with the password βpasswordβ and share with me the hash that is generated so that I can experiment?
Thanks,
Tom π
Forum: Plugins
In reply to: [External Login] Its saying – Invalid username or passwordHey @anand_jodawat,
That’s great news! π
If everything is working for you I’d be grateful if you could write a review or even buy me a beer.
Thanks,
Tom
Forum: Plugins
In reply to: [External Login] Its saying – Invalid username or passwordHey @anand_jodawat,
Great to hear you’ve made a good start and the test connection is working correctly π
You’re correct that if the hash is wrong, you will get this error.
There is an infinite amount of possibilities for hashing configuration. The most common are supported in the options menu of the plugin.
If you have a more custom hashing solution, you may need to use the plugins inbuilt hook to script the support needed for your use case.
In regard to know which hashing solution is being used in the external database, you can look at the hash stored in the password field and see if you can see if you can match it up to a pattern shown by one of the supported hashing algorithms. The main plugin page shows examples of hashes for each.
Of course your solution may not be supported at all and will require the use of the built in hash. In such a case, you really need to:
– ask the developer who wrote the external system
– read the code yourself (or pay a developer to) to see what was used
– if the external database is a commonly used system, look at the docs online or Google it πI think I’ve answers your question so I’ll mark this as resolved but if you have any further questions please don’t hesitate to get back in contact here and I’ll be happy to help π
Thanks,
Tom
Forum: Plugins
In reply to: [External Login] Roles not showingHey @ketr64,
Great to hear this is all working for you. π
I also really appreciate you updating me with the following two warnings. Even though they are just expected warnings, it’d be good to clear them up π
If it all works Iβd be grateful if you could write a review or even buy me a beer.
Thanks,
Tom π
Forum: Plugins
In reply to: [External Login] Using WP DB when it should only be using externalForum: Reviews
In reply to: [External Login] Great plugin!Hey @sintwar,
I really appreciate you taking the time to write a review π
I’m glad the plugin is working out for you π
Tom
Forum: Plugins
In reply to: [External Login] Using WP DB when it should only be using externalHey @sintwar,
Thatβs great news π
If it all works Iβd be grateful if you could write a review or even buy me a beer.
Good luck with your project π
Tom
Forum: Plugins
In reply to: [External Login] Roles not showingHey Rene,
I’ve just finished testing and run a release for you.
I think this release should solve your problem and hopefully remove the warnings you could see also.
If you do still see some, you may have
WP_DEBUGset totruewhich you may or may not want.Please let me know if this has solved your issue.
Thanks Rene π
Tom
Forum: Plugins
In reply to: [External Login] Using WP DB when it should only be using externalHey @sintwar,
Thanks for getting in touch.
I have just run through a flow to ensure this feature is working. Here’s what I did:
- Logged in as USERA who does not exist in any database
- Tested that the login failed
- Added the user to the external database
- Checked that the user was logged in and the user was created in the WordPress DB
- Made sure disable external login was not activated
- Deleted user from external database
- Logged in as user
- Checked I was authenticated
- Activated disable local login
- Logged in again and was not authorised as expected
I imagine this is either some other form of caching in your infrastructure OR you have another plugin that is maybe acting on the WordPress
authenticatehash to authenticate users (unlikely).My suggestions are:
- Check you do not have a level of caching on reading from your WordPress database
- Set yourself back to the default theme and deactivate all other plugins to ensure the flow is not getting effected
If you’ve checked these things and you’re still seeing issues I’ll advise you with some logging code snippets to add into the plugin so that I can help you diagnose the problem.
Let me know how you get on π
Thanks,
Tom
Forum: Plugins
In reply to: [External Login] Roles not showingHey Rene,
Apologies but I somehow missed the message before the one you send yesterday.
Sincere apologies.
Ok, great. So it sounds like it’s all working but you’re seeing these errors in the roles settings section.
I will have a look at this now and see if I can see what is causing these errors then get a release under way.
I will keep you posted π
Feel free to check in with my tomorrow evening if you have not heard from me π
Forum: Plugins
In reply to: [External Login] Bulk transfer of all external usersSounds awesome! Good luck with the project π
Forum: Plugins
In reply to: [External Login] Bulk transfer of all external usersHey @markc,
The plugin does not currently support this. I am working on a paid for solution for this but it is not complete and probably not the free solution you were looking for.
I’ll leave this ticket open so if others show interest I’ll bump it up my priority list.
Thanks for showing interest @markc and apologies for not quite being there yet.
Thanks,
Tom