• Resolved joelod

    (@joelod)


    Hi,

    First of all, thanks for the excelent job on this plugin. Even the free version offers so much, it is a really greate tool to have.

    But I do have a question regarding it. I’m using a custom admin url, with the Defender Masking URL setting. When I have the Masking url, I can’t submit post forms with “wp-admin/admin-post.php”, but the “[mask]/admin-post.php” also doesn’t work.

    Is there anything I can do to make the form work, without having to let go the Defender masking url setting?

    Note: This form submission is supposed to work with unlogged users, since it’s a custom age verification form (no additional plugins used for this).

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @joelod

    I hope you are doing good today.

    Note: This form submission is supposed to work with unlogged users, since it’s a custom age verification form (no additional plugins used for this).

    This sounds like a conflict here and possibly this was a custom form made by you or your developers.

    To review this case more could you follow the below guide:
    1. share this form core file(s) in a gist or ZIP it and share on some google drive/dropbox
    2. share information on how this form is implemented on the site and (mu-plugin / path / shortcode)

    If you’re not able to share the above information due to policy or not willing to share this core files in public could you email us through our secure contact form here https://premium.wpmudev.org/contact/#i-have-a-different-question and make sure that subject is “I have a different question” and:
    – ATTN: Kris
    – Link back to this thread

    Kind Regards,
    Kris

    Thread Starter joelod

    (@joelod)

    Hi Kris,

    I’m doing good thanks, hope you’re too!
    Thanks for the reply.

    Here’s what the function for the post submission looks like:
    https://gist.github.com/joelod/c061fc41f66ff3d8a162b1cb020dcc05

    And here’s what the HTML look like:
    https://gist.github.com/joelod/8fe0fe2429fd2ab84600c986c9f2ccd0

    This is what I get when I have the Masking URL option for the /wp-admin:

    View post on imgur.com

    No plugins used for the form submission (I develop everything I can, so I’m barely using plugins, just WooCommerce, WPML and ACF, Defender).

    Best regards,
    Joel

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @joelod,

    As you are submitting to admin, that is expected behaviour. Also if you are using esc_attr, you should use it for the entire attribute.

    You can submit the form using Ajax as the sole purpose of the feature of masking the URL is to block access to wp-admin. If you would not like to do that, you can use the following to deactivate the masking when the age-verified is posted:

    add_filter( 'wpd_masklogin_disabled', function( $disabled ){
    	if ( isset($_POST['age-verified'] ) ) {
    		return true;	
    	}
    	return $disabled;
    } );

    Kindly note that when I checked with the SLS team, they said this is not safe to be used. They suggested adding some nonce. Do let me know if that helps.

    Thank you,
    Prathamesh Palve

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @joelod

    I hope you are doing well.

    We haven’t heard from you in a while, I’ll go and mark this thread as resolved.

    However, feel free to let us know if you have any additional question or problem.

    Best Regards
    Patrick Freitas

    Thread Starter joelod

    (@joelod)

    Hi Patrick,

    I’m really sorry I had a few days off and forgot to say that your solution helped me, it’s working fine now! Also, thank you for the nonce tip!

    Best regards,
    Joel Domingues

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

The topic ‘‘wp-admin/admin-post.php’ not accessible when using Masking URL’ is closed to new replies.