Skip Navigation

[Resolved] Password Protected Post Bug with WPEngine

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Noman 5 years, 11 months ago.

Assisted by: Noman.

Author
Posts
#877786

I received a 502 error when trying to enter a password on a password protected post on a WPEngine site while using your theme. I spoke with their support and they said it was because they have anti-brute force protections in place and code in the theme was trying to bypass this. Their system works by filtering 'site_url', which is how WordPress does it their core code (see here: https://core.trac.wordpress.org/browser/tags/4.9/src/wp-includes/post-template.php#L1625) but your theme doesn't. In the wpbootstrap_password_form function of the parent theme you have the following code (line 266 in functions/bootstrap-wordpress.php):

action="' . get_option( 'siteurl' ) . '/wp-login.php?action=postpass"

I created a function to override this in the child theme and fixed the problem by using the following:

action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '"

Again, this is consistent with the WordPress core code, so my suggestion would be for you to update the parent starter theme to match.

Thanks!

--
Klint

#901626

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Klint,

Thank you for getting in touch with us and for the feedback. We will review your suggestion and update if its really required.

Thank you

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.