Closed Bug 766479 Opened 13 years ago Closed 13 years ago

Password protected pages don't work

Categories

(Infrastructure & Operations Graveyard :: WebOps: Other, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zandr, Assigned: dmaher)

References

()

Details

The "Password Protected" feature on Wordpress Pages doesn't actually work. I think this is true across our entire WP deployment, but it's certainly been true of anything called 'air mozilla' for quite a while. This would have been useful for bug 766400, and this kind of thing will come up again.
Assignee: server-ops → dmaher
For the Airmo page (at least), the symptoms are as follows : * When a user attempts to access a "password protected" page, WP will instead offer the standard password challenge form. * After hitting submit, the user is forwarded to /wp-pass.php , whereupon a blank page is displayed (view->source is empty also). * This occurs regardless of whether the password is correct or not. Investigation on-going.
Status: NEW → ASSIGNED
A little jiggery-pokery in the in air-dev.a.o has revealed the source of the problem, and thankfully, it's an easy fix. tl;dr : In wp-admin -> Settings -> General the URL must be *https*, not http. The wp-pass.php page calls wp_safe_redirect, an internal function to (you guessed it) return the user to the previous resource. This function tries to avoid hijacking by ensuring that the referring resource and the redirect are are coherent; in this case they were not, since the referrer was an httpS URL, but the WP-generated redirect was base http only. This caused wp_safe_redirect to fail - silently, but such is life. I've fixed the bug in Airmo dev/stage/prod. It is entirely possible (probable?) that other Moz WP sites could run into this bug, so they should probably all be verified. I'll create a separate bug for this.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.