• Resolved dawidc

    (@dawidc)


    Subject: Fatal error when using Ultimate Member login

    Hello Colin,

    I am using Single Sign On For TNG version 2.0.0 with WordPress, TNG and the Ultimate Member plugin.

    The connection to TNG works and the WordPress user is successfully created in TNG as a Guest. However, when the user logs in through the Ultimate Member login page, WordPress displays a critical error.

    The error log shows:

    PHP Fatal error: Uncaught TypeError: Argument 1 must be a string, null given

    The stack trace points to:

    wp-content/plugins/single-sign-on-for-tng/classes/cryptor.php(68)
    sodium_crypto_secretbox()

    It appears that Ultimate Member’s automatic login process calls the plugin without providing a password, so the plugin attempts to encrypt a null value.

    WordPress user creation in TNG works correctly, but the login then crashes.

    Could you please advise whether version 2.0.0 supports Ultimate Member, or provide a compatibility fix that checks for a null password before encryption?

    Thank you.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Colin Stearman

    (@britcoder)

    Sorry for the delay in replying. I will look into this issue right away. I am in the process of preparing V2.1.0 so look for a fix when that is released. It will be soon.

    Regards,
    Colin

    Plugin Author Colin Stearman

    (@britcoder)

    My initial research, with AI’s help, suggests this is the problem.

    The wp_authenticate() Pluggable Function: This core WordPress function specifically handles form-based admin logins (the default /wp-login.php screen). Ultimate Member does not call this function because it bypasses the default login page in favor of custom front-end forms and API-level programmatic sign-ons (like wp_set_auth_cookie).

    I use the wp_authenticate action to capture the entered password. However there is a filter called authenticate that UM appears to call, according AI.

    In my setup (not using UM!) the action wp_authenticate and the filter authenticate both got called, but as the code called does the same thing for each, it did no harm and worked fine. It might be possible to remove the action in favor of the filter, but I’m not going to go that far.

    I have added code to implement this in the upcoming V2.1.0 release but do not have a UM installation to test it with. Let me know if you could help with this.

    Thread Starter dawidc

    (@dawidc)

    Hi,

    Yes, I would be happy to help test Version 2.1.0 with Ultimate Member.

    Please send me the test version and any installation or testing instructions. I currently have a test member account available, so I can test whether logging in through the Ultimate Member login form also logs the user into TNG automatically.

    I will take a backup before installing the test version and will report the results back to you.

    Plugin Author Colin Stearman

    (@britcoder)

    I am waiting for WordFence to review some changes to fix a vulnerability they discovered, so won’t build 2.1.0 until they give me the OK that it’s fixed, assuming they do.

    I am not sure how I will get the plugin to you as this forum is pretty strict about transferring code. You could leave information on how to get it to you on my Contact Me form at my website, stearman.com.

    Thread Starter dawidc

    (@dawidc)

    Hi Colin , did you get my em add i sent you?

    Plugin Author Colin Stearman

    (@britcoder)

    Yes And here was the reply I sent on July 19th to the email address you provided.

    Got your Contact Me submission.
    When I have 2.1.0 available I will contact you again with information about how to test it.

    Colin

    Plugin Author Colin Stearman

    (@britcoder)

    Hi,

    Due to seriousness of the vulnerability in V2.0.0 I needed to get v.2.1.0 out as soon as possible. It also has what I believe is a fix for the Ultimate Member issue you reported. Please update to the latest version and report your findings.

    Thanks,
    Colin

    Plugin Author Colin Stearman

    (@britcoder)

    Hi Dawid,

    Just to let you know, if I don’t here back from you by August 6th on how the testing went, I am going to mark this issue as closed.

    Thanks for your interest.
    Colin

    Plugin Author Colin Stearman

    (@britcoder)

    As I’ve heard no more on this issue I am marking it as resolved.

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.