[wp-trac] [WordPress Trac] #18824: Password protected pages don't work if site address is different from wordpress address

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 30 13:15:09 UTC 2011


#18824: Password protected pages don't work if site address is different from
wordpress address
--------------------------+-----------------------------
 Reporter:  3singes       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.2.1
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 Hi,

 On a 3.2.1 wordpress site, we notices that password protected pages didn't
 work.

 Site address is in another domain (x.com) than wordpress address (y.com).

 If we set the same domain for both of them, protected pages work again.

 I think I understood what was going on:

 1. the browser gets the form for the password via siteurl.
 2. however the forms posts data to wordpress address (wp-pass.php), and
 the browser gets the cookie within this domain (and not siteurl domain)
 3. the browser is redirected to siteurl, but the cookie doesn't work
 (domain mismatch).

 I corrected wp-pass.php, by replacing get_option('siteurl') by
 get_option('home'), and it worked.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18824>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list