Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11613

Cookies do not work for netbios domain

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.13-RC1, 3.1.3-RC1
    • 3.0.11
    • Sessions
    • None
    • PHP 5.4.16, Apache 2.2.15 (CentOS), [Chrome 27.0.1453.116 | IE 9 | IE 8]

      Hi,

      If phpBB is installed on a local network, and his "domain" is only a netbios name, cookies will not work.
      E.G.: http://intranet/

      This is due to the lack of dots in the domain name (like "localhost").

      Possible way to fix:
      OPEN
      includes/session.php

      FIND
      $domain = (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain'];

      REPLACE WITH
      $domain = (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1' || strpos($config['cookie_domain'], '.') === FALSE) ? '' : '; domain=' . $config['cookie_domain'];

            Marc Marc
            Théonaute Théonaute [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: