[wpmu-trac] [WordPress MU Trac] #182: Auth. cookie fails when using domain without a TLD

WordPress MU Trac wpmu-trac at lists.automattic.com
Fri Oct 13 21:25:09 GMT 2006


#182: Auth. cookie fails when using domain without a TLD
------------------------+---------------------------------------------------
 Reporter:  shaynes     |       Owner:  somebody                               
     Type:  defect      |      Status:  new                                    
 Priority:  high        |   Milestone:                                         
Component:  component1  |     Version:                                         
 Severity:  major       |    Keywords:  wpmu authentication cookie TLD hostname
------------------------+---------------------------------------------------
 In my development environment coLinux, I recently checked out the latest
 revision of Wordpress MU (WPMU). That revision as of then was r803.

 Seeing how I am using coLinux I have aptly used the hostname coLinux and
 communicate via a web browser using that hostname.

 After setting up WPMU, I attempted my first login as user 'admin.' Upon
 entering the correct credentials I was immediately forwarded back the the
 'wp-login.php' page. The screen gave no error messages of any kind.

 Without explaining my debug process too much, I had figured out that the
 authentication cookie that was being set was incorrect when using a single
 word hostname, without a TLD.

 The problem boiled down to the COOKIE_DOMAIN constant as defined in 'wp-
 settings.php.' When using a single word domain, one without a TLD of any
 kind, the cookie is improperly formed and WPMU isn't able to continue.

 My hack of a fix is short and simple, painless to say the least. However,
 I believe a simple conditional should be added to the core code to prevent
 future problems and frustration.

 Upon setting a constant (verbatim to code below), I am succesfully able to
 use WPMU.
 define('COOKIE_DOMAIN', false);

 Looking forward to 1) a fix and 2) your opinions.

 Thank you,
 Shayne Sweeney

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/182>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list