[wpmu-trac] Re: [WordPress MU Trac] #775: COOKIEHASH not defined in WPMU 2.6.2 as it is in WP2.6.2

WordPress MU Trac wpmu-trac at lists.automattic.com
Tue Oct 21 20:01:12 GMT 2008


#775: COOKIEHASH not defined in WPMU 2.6.2 as it is in WP2.6.2
---------------------------------------+------------------------------------
 Reporter:  eagano                     |        Owner:  somebody
     Type:  defect                     |       Status:  new     
 Priority:  normal                     |    Milestone:  WPMU 2.0
Component:  component1                 |      Version:          
 Severity:  normal                     |   Resolution:          
 Keywords:  cookiehash cookie bbpress  |  
---------------------------------------+------------------------------------
Comment (by eagano):

 More testing shows my mistake. bbPress effectively uses
 md5('http://mywpmu.com'), and when I login via http://myblog.mywpmu.com
 the md5 hash creates a different cookie name (as you pointed out) and will
 not auto-login to bbPress or any other blogs to which the user has access.
 I was testing from the main blog, hence my initial success.

 However, if I hardcode COOKIEHASH to the value md5('http://mywpmu.com')
 everything works great for any blog on the domain. This is effectively
 md5(get_option('site_url')) for the main blog. This could also come from
 the wp_site table where site=1, but I'm not really sure of the best way to
 derive it.

 Calculating the hash at install and hardcoding that value in wp-config.php
 would allow two things, I think:
 1) the cookie hash would be the same across all blogs in one domain, so
 once logged in a user would have access to all their blogs on that domain
 (as is current with WPMU), and
 2) allow bbPress integration

 But as you pointed out, that breaks down with more than one MU site on a
 single install. In that case, the hash would probably have to be hardcoded
 to a specific value in both config files, but you might then have users
 posting to other sites' forums...not sure if that would be desirable.

 I do think that WPMU/bbPress is a very good combination, one that many
 will want to run, and to enable cookie integration for at least one site
 would be great!

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/775#comment:4>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list