• Resolved timrv

    (@tim01)


    Hello,

    I’m using the free version of pmpro and a WordPress Multisite-Install with the latest WP 5.3. My issue is that when a user registers with a %[any integer], then login and try to login again. It seems like the site won’t let him to login.

    Setup:
    1. WP 5.3
    2. paid-memberships-pro 2.2 (Free Version)
    3. Only “paid-memberships-pro” is the plugin installed

    Testing:
    1. Create 1 membership
    2. Register to that membership with a password like:
    GsTg%35sdf or sfrfs%54sRg
    3. After you have created the account, Please logout and login again using those credentials
    4. It won’t let you login.
    5. Now try and register again with a simple password like: password, password1234
    6. Logout and register again
    7. You will be able to login with these credentials

    It seems like any password with percent + integer is not working.

    • This topic was modified 5 years ago by timrv.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @tim01

    Thank you for using Paid Memberships Pro, I’m sorry to hear about this issue you are facing.

    I am going to try and recreate this issue on my end for you. Paid Memberships Pro, sanitizes the input for the password field before saving this to the database.

    I’m really sorry about this inconvenience caused by this.

    Plugin Author Andrew Lima

    (@andrewza)

    I have run some tests on my local environment and I am unable to recreate this issue. Would you mind running a test registration on your site using the default WordPress registration process and try to replicate this issue?

    Thread Starter timrv

    (@tim01)

    Hello,

    I’ve set-up a site where you can test. https://venernet.org/membership-account/membership-levels/

    When you purchase, You can enter any fake credit card number to test. then on password put something like Dhhfs%54Rg. After that logout and login again using those credentials.

    The only plugin installed on that site is the free version of PMPRO. Here’s a screenshot on the backend: https://take.ms/y5wyw

    I could share the login credentials of the admin if there’s a secured link or email I could send it to.

    Plugin Author Andrew Lima

    (@andrewza)

    Thank you for your feedback, I am going to run some further tests with a Multisite setup.

    I will revert back as soon as I possibly can.

    Please do not send through login details, this goes against the www.remarpro.com forum guidelines.

    Thank you for your patience and understanding.

    Thread Starter timrv

    (@tim01)

    Thanks!

    Have you tried registering on the test site that I provided? Please let us know also if you managed to replicate it as it happens on any Installation I made.

    Plugin Author Andrew Lima

    (@andrewza)

    Thanks for the feedback, this sounds like a site-specific issue.

    Would you mind checking your database table encoding to ensure it supports special characters?

    What payment gateway are you using? Are you able to test this with another payment gateway?

    Thread Starter timrv

    (@tim01)

    Hi @andrewza,

    Unfortunately, I don’t think that it’s a site-specific issue. I have already tried it on 3 different hosting sites, multiple local installations with different PHP versions and it’s the same. This happens only specifically on PMPRO which is weird. I don’t think it’s a matter of single and multi-site issue also as it happens on my single site install. I even tested it on your latest release 2 to 3 days ago and no luck. It’s very specific to some passwords with percent + 2 digit integer.

    Single Site:
    https://pmprosingle.timstructures.com/membership-account/membership-levels/

    Multisite:
    https://pmpro.timstructures.com/membership-account/membership-levels/

    Try and register with any usernames and use password like: Dgfttr%54gs2

    I have already tried changing the database encoding and it’s still the same. I have tried using the same database also for WooCommerce and it doesn’t happen to them.

    They are both PHP 5.3 that uses PHP 7.3 and only the PMPRO plugin is installed and Twenty Nineteen theme is activated.

    If you have a demo site where I could try to register, Feel free to send me a link and I would test it there.

    Thanks!

    While waiting for the reply, I’ll try to dig the code and find the cause, My guess is that there’s probably a code where pmpro thinks that the “%54” in the password is an encoded character. (ie: It thinks that it’s a letter “T”) https://www.w3schools.com/tags/ref_urlencode.asp

    Thread Starter timrv

    (@tim01)

    Hello,

    I made some digging on the checkout code. It seems like the password field is passed to the WP function “sanitize_text_field” which sanitizes the passwords. The issue is the password now changes.

    $password = sanitize_text_field($_REQUEST['password']);

    Example:

    $password = sanitize_text_field( 'Dgfttr%54gs2' );

    This code would result to: “Dgfttrgs2” which is not the same as to what the user have typed, thus login in again would mean that the password is incorrect.

    or

    $password = sanitize_text_field( 'AbCd%54eFg' );

    This code would result to: “AbCdeFg” which is entirely different also..

    However, If you use some password like:

    $password = sanitize_text_field( 'DGSg%%4trh' );

    This code would result to: “DGSg%%4trh” which is the same as what the user has typed.

    With this, I hope that it’s considered now as bug.

    Plugin Author Andrew Lima

    (@andrewza)

    Thanks for digging deeper into this, I am going to escalate this to our development team.

    Please feel free to create an issue on our Github repository regarding this – https://github.com/strangerstudios/paid-memberships-pro

    Thread Starter timrv

    (@tim01)

    Thanks! I have created a bug report on the Github repository. I’m not sure how you classify bugs, But I think this is a little urgent one because it involved user passwords?

    Plugin Author Andrew Lima

    (@andrewza)

    Thank you for creating the issue on Github, I cannot give an exact date regarding when this will be resolved/fixed as there are many factors that go into updates/fixes for Paid Memberships Pro.

    We are open to Pull Requests by the community for any of our plugins and encourage developers to contribute as this often helps speed up the process.

    I’m really sorry for the inconvenience caused by this. Thank you for your understanding.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Password on Registration Doesn’t work’ is closed to new replies.