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

Invalid email message ids because config variable server_name is used even when force server URL settings is disabled

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.10
    • Fix Version/s: 3.0.12-RC1
    • Component/s: ACP
    • Labels:
      None

      Description

      The configuration variable server_name is used in email code, for example to generate message ids. If "Force server URL settings:" is disabled (which it is by default) then server_name can be left empty. This leads to incorrect message ids lacking a host part. As the server_name used for the URL might even be different from the hostname sending the email the function gethostname() would ideally be used. But it is only available in PHP >= 5.3.0. So an alternative is required that does not use server_name. We also need to review all other code for uses of these configuration variables which might be empty.

        Activity

        Hide
        Oleg Oleg [X] (Inactive) added a comment - - edited

        Message ids do not need to be anything in particular, just make up a \w+ matching string in lieu of host name if necessary.

        Show
        Oleg Oleg [X] (Inactive) added a comment - - edited Message ids do not need to be anything in particular, just make up a \w+ matching string in lieu of host name if necessary.
        Show
        Oleg Oleg [X] (Inactive) added a comment - wip https://github.com/p/phpbb3/tree/ticket/10986
        Hide
        naderman Nils Adermann added a comment -

        Definition of a message id from RFC 2822

        msg-id          =       [CFWS] "<" id-left "@" id-right ">" [CFWS]
        id-left         =       dot-atom-text / no-fold-quote / obs-id-left
        id-right        =       dot-atom-text / no-fold-literal / obs-id-right
        no-fold-quote   =       DQUOTE *(qtext / quoted-pair) DQUOTE
        qtext           =       NO-WS-CTL /     ; Non white space controls
         
                                %d33 /          ; The rest of the US-ASCII
                                %d35-91 /       ;  characters not including "\"
                                %d93-126        ;  or the quote character
        no-fold-literal =       "[" *(dtext / quoted-pair) "]"
        obs-id-right    =       domain
        domain          =       dot-atom / domain-literal / obs-domain
        obs-domain      =       atom *("." atom)
        atom            =       [CFWS] 1*atext [CFWS]
        dot-atom        =       [CFWS] dot-atom-text [CFWS]
        dot-atom-text   =       1*atext *("." 1*atext)
        atext           =       ALPHA / DIGIT / ; Any character except controls,
                                "!" / "#" /     ;  SP, and specials.
                                "$" / "%" /     ;  Used for atoms
                                "&" / "'" /
                                "*" / "+" /
                                "-" / "/" /
                                "=" / "?" /
                                "^" / "_" /
                                "`" / "{" /
                                "|" / "}" /
                                "~"
        domain-literal  =       [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS]
        dcontent        =       dtext / quoted-pair
        quoted-pair     =       ("\" text) / obs-qp
        obs-qp          =       "\" (%d0-127)
        text            =       %d1-9 /         ; Characters excluding CR and LF
                                %d11 /
                                %d12 /
                                %d14-127 /
                                obs-text
        obs-text        =       *LF *CR *(obs-char *LF *CR)
        obs-char        =       %d0-9 / %d11 /          ; %d0-127 except CR and
                                %d12 / %d14-127         ;  LF
        dtext           =       NO-WS-CTL /     ; Non white space controls
         
                                %d33-90 /       ; The rest of the US-ASCII
                                %d94-126        ;  characters not including "[",
                                                ;  "]", or "\"

        Show
        naderman Nils Adermann added a comment - Definition of a message id from RFC 2822 msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS] id-left = dot-atom-text / no-fold-quote / obs-id-left id-right = dot-atom-text / no-fold-literal / obs-id-right no-fold-quote = DQUOTE *(qtext / quoted-pair) DQUOTE qtext = NO-WS-CTL / ; Non white space controls   %d33 / ; The rest of the US-ASCII %d35-91 / ; characters not including "\" %d93-126 ; or the quote character no-fold-literal = "[" *(dtext / quoted-pair) "]" obs-id-right = domain domain = dot-atom / domain-literal / obs-domain obs-domain = atom *("." atom) atom = [CFWS] 1*atext [CFWS] dot-atom = [CFWS] dot-atom-text [CFWS] dot-atom-text = 1*atext *("." 1*atext) atext = ALPHA / DIGIT / ; Any character except controls, "!" / "#" / ; SP, and specials. "$" / "%" / ; Used for atoms "&" / "'" / "*" / "+" / "-" / "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~" domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS] dcontent = dtext / quoted-pair quoted-pair = ("\" text) / obs-qp obs-qp = "\" (%d0-127) text = %d1-9 / ; Characters excluding CR and LF %d11 / %d12 / %d14-127 / obs-text obs-text = *LF *CR *(obs-char *LF *CR) obs-char = %d0-9 / %d11 / ; %d0-127 except CR and %d12 / %d14-127 ; LF dtext = NO-WS-CTL / ; Non white space controls   %d33-90 / ; The rest of the US-ASCII %d94-126 ; characters not including "[", ; "]", or "\"

          People

          • Assignee:
            naderman Nils Adermann
            Reporter:
            naderman Nils Adermann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development