Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11613

Cookies do not work for netbios domain

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.11
    • Fix Version/s: 3.0.13-RC1, 3.1.3-RC1
    • Component/s: Sessions
    • Labels:
      None
    • Environment:
      PHP 5.4.16, Apache 2.2.15 (CentOS), [Chrome 27.0.1453.116 | IE 9 | IE 8]

      Description

      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'];

        Activity

        Hide
        bantu Andreas Fischer added a comment -

        This does not only apply to NETBIOS names, it also applies in situations where a hostname is used in combination with DNS search domain.

        Show
        bantu Andreas Fischer added a comment - This does not only apply to NETBIOS names, it also applies in situations where a hostname is used in combination with DNS search domain.
        Hide
        Marc Marc added a comment -

        Missing PR for develop-olympus.

        Show
        Marc Marc added a comment - Missing PR for develop-olympus.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development