Fork me on GitHub
Subscribe 7

Ticket #679 (fixed bug)

Clickable links and ftp.exe

  • Created: 2012-06-06 19:04:08
  • Reported by: Lanark
  • Assigned to: quy
  • Milestone: 1.5.1
  • Component: parser
  • Priority: normal

If the option for clickable links is enabled then entering:

FTP.exe
will be converted to
ftp://ftp.exe/

although this doesnt affect other strings like
abc.exe

(also as per this thread trailing slashes get ignored http://fluxbb.org/forums/viewtopic.php?pid=46811)

History

Lanark 2012-06-06 19:06:31

... and it also affects this bug tracking page, I'm seeing FTP.exe above hyperlinked to http://ftp.exe/

Franz 2012-06-06 19:22:28

  • Milestone set to 1.5.1.

Yeah, we are using the forum's parser here. smile

arw 2012-06-07 17:12:36

but then should it just be corrected as a specific case ( issue is too with any extension : .rar, .zip, .tar, ... ), or should things like :

ftp.ubuntu.com

not be linkified with protocol ftp too?

i don't know how often it is to have ftp website on subdomain "ftp.", but searching google there is some "http://" sites with subdomain "ftp."

Franz 2012-06-07 20:31:48

I think it is quite common to have them available via HTTP, too.

mike001 2012-06-11 01:33:27

the problem also exists with www.exe , www.zip

www.exe
www.zip
...
www.*

I think a possible solution is to make clickable only if the url is third level domain and the top level domain is in IANA list's (com , net , org , fr, de , it , )

arw 2012-06-11 13:58:07

with future new top-levels www.pididi.[anything] could be an address

maybe it would just need to do it only if there is 2 .

so it would act on wwww.some.thing but not on www.thing

there would still be issue with www.tar.gz but that would not be a lot ( and it could be an address )

quy 2012-08-07 03:02:22

If the option for clickable links is enabled then entering:

FTP.exe
will be converted to
ftp://ftp.exe/

although this doesnt affect other strings like
abc.exe

Why is this a bug? Per the parser, it is working as designed.

	else if (strpos($url, 'ftp.') === 0) // Else if it starts with ftp, we add ftp://
		$full_url = 'ftp://'.$full_url;

(also as per this thread trailing slashes get ignored http://fluxbb.org/forums/viewtopic.php?pid=46811)

The post was posted before the trailing slash fix.

Franz 2012-08-07 13:17:20

How about making sure the string starting with "ftp." has at least one more dot, thus making sure we're talking about a subdomain called "ftp" (although this could still match something like

ftp.myapp.exe

Maybe at the same time make sure it's an URL?

Oldskool 2012-09-12 12:37:40

The only way to make sure it's a valid host is by using DNS lookup and see if it resolves. The question then becomes whether the extra time this check takes is an acceptable collateral. Personally, I don't think it is and I'd like to think that a check like ftp.*.* should be good enough.

quy 2012-10-08 01:12:15

Commit d6bfa19 to fluxbb master

#679: Don't hyperlink URLs prefixed with www/ftp if not in subdomain format

quy 2012-10-08 01:14:55

  • Owner set to quy.
  • Status changed from open to fixed.