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

Off-site link for avatar not working for URLs without tld (?)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.0
    • 3.0.x
    • Other
    • None
    • PHP Environment:
      Database:

      Try linking to an off-site (well, not really off-site here, but that shouldn't be the problem probably...) avatar using a server's IP address
      URL:

      http://192.168.2.7/~username/forum/styles/prosilver/imageset/site_logo.gif


      => "The URL you specified is invalid."

      The "problem" seems to be the *\.[a-z]

      {2,4}* of the regex in includes/functions_user.php, line 1599:

       

      if (!preg_match('#^(http|https|ftp)://(.?\.)?[a-z0-9\-]+?\.[a-z]{2,4}

      :?([0-9]?).?\.(gif|jpg|jpeg|png)$#i', $data['remotelink']))

       


      I'm no regex expert, but removing it helped, i.e. that should be optional or so if possible.
      Is that a bug or intended (i.e. "We don't allow linking to IP-only servers")?

            Kellanved Kellanved [X] (Inactive)
            unknown user unknown user
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: