--- settings.php	2007-03-26 09:43:12.000000000 +0300
+++ settings-new.php	2007-03-28 12:39:06.192773096 +0300
@@ -142,6 +142,8 @@
  */
 if (isset($_SERVER['HTTP_HOST'])) {
   $domain = '.'. preg_replace('`^www\.`', '', $_SERVER['HTTP_HOST']);
+  // Per RFC 2109, cookie domains must not contain port number
+  list($domain, $port) = explode(':', $domain, 2);
   // Per RFC 2109, cookie domains must contain at least one dot other than the
   // first. For hosts such as 'localhost', we don't set a cookie domain.
   if (count(explode('.', $domain)) > 2) {
