Forum Replies Created

Viewing 15 replies - 76 through 90 (of 574 total)
  • Forum: Plugins
    In reply to: [External Login] ssha256
    Plugin Author tbenyon

    (@tbenyon)

    Bad 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] ssha256
    Plugin Author tbenyon

    (@tbenyon)

    Hey @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] ssha256
    Plugin Author tbenyon

    (@tbenyon)

    Hey 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 JVCmnFjLqYvJJLPKfhG7a6KFaa6JmrEeg8mhTkYqWIljOGMzZmE1OTlhNjE0NzY5 isn’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] ssha256
    Plugin Author tbenyon

    (@tbenyon)

    Hey @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 πŸ™‚

    Plugin Author tbenyon

    (@tbenyon)

    Hey @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

    Plugin Author tbenyon

    (@tbenyon)

    Hey @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

    Plugin Author tbenyon

    (@tbenyon)

    Hey @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 πŸ™‚

    Plugin Author tbenyon

    (@tbenyon)

    Hey @sintwar,

    That’s really cool of you. It’s really appreciated.

    Have an awesome day πŸ™‚

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @sintwar,

    I really appreciate you taking the time to write a review πŸ™‚

    I’m glad the plugin is working out for you πŸ™‚

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @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

    Plugin Author tbenyon

    (@tbenyon)

    Hey 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_DEBUG set to true which you may or may not want.

    Please let me know if this has solved your issue.

    Thanks Rene πŸ™‚

    Tom

    Plugin Author tbenyon

    (@tbenyon)

    Hey @sintwar,

    Thanks for getting in touch.

    I have just run through a flow to ensure this feature is working. Here’s what I did:

    1. Logged in as USERA who does not exist in any database
    2. Tested that the login failed
    3. Added the user to the external database
    4. Checked that the user was logged in and the user was created in the WordPress DB
    5. Made sure disable external login was not activated
    6. Deleted user from external database
    7. Logged in as user
    8. Checked I was authenticated
    9. Activated disable local login
    10. 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 authenticate hash 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

    Plugin Author tbenyon

    (@tbenyon)

    Hey 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 πŸ™‚

    Plugin Author tbenyon

    (@tbenyon)

    Sounds awesome! Good luck with the project πŸ™‚

    Plugin Author tbenyon

    (@tbenyon)

    Hey @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

Viewing 15 replies - 76 through 90 (of 574 total)