Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-4572 now.

Off-site link for avatar not working for URLs without tld (?) (fix completed in vcs)

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:
Code: Select all
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:
Code: Select all
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")?

Comments / History

Edited ticket

Action performed by dark/Rain on May 23rd 2007, 19:15

Edited ticket

Action performed by dark/Rain on May 23rd 2007, 19:18

Assigned ticket to user "Kellanved"

Action performed by Acyd Burn (Server Manager) on May 24th 2007, 14:36

Changed ticket status from "New" to "Fix in progress"

Action performed by Kellanved (Former Team Member) on May 25th 2007, 11:00

Linked ticket with changeset: r7677

Action performed by Kellanved (Former Team Member) on May 25th 2007, 16:03

Changed ticket status from "Fix in progress" to "Fix completed in CVS"

Action performed by Kellanved (Former Team Member) on May 25th 2007, 16:04

Ticket details

Related SVN changesets