Adium

Opened 15 years ago

Closed 14 years ago

Last modified 8 years ago

#249 closed defect (fixed)

Overzealous URL-ification in 0.8svn

Reported by: adium-trac-url@g.gshapiro.net Owned by: anybody
Milestone: Adium X 1.0 Component: Adium Core
Version: Severity: minor
Keywords: Cc:
Patch Status:

Description

I recently sent the following to a co-worker:

   Set your SMTP server to tls.sendmail.com

They received:

   Set your SMTP server to http://tls.sendmail.com

Unfortunatley, it looks like 0.8 turns anything that looks like a hostname into a URL even if it really is just a hostname. After all, there is more to the Internet than the web. This seems to happen with all of the IM services.

Just to be sure it was Adium adding the http://, I ran tcpdump to see what what was being sent:

13:18:48.507926 IP 192.168.121.5.64704 > cs14.msg.dcn.yahoo.com.mmcc: P 168:305(
137) ack 1 win 65535 <nop,nop,timestamp 1514733299 64416467>
        0x0000:  0009 5b3d 43e6 0030 6520 5e66 0800 4500  ..[=C..0e.^f..E.
        0x0010:  00bd 89e1 4000 4006 dc82 c0a8 7905 d89b  ....@.@.....y...
        0x0020:  c18d fcc0 13ba d16e d8c9 4ac1 65fa 8018  .......n..J.e...
        0x0030:  ffff 20e3 0000 0101 080a 5a48 fef3 03d6  ..........ZH....
        0x0040:  ead3 594d 5347 000c 0000 0075 0006 5a55  ..YMSG.....u..ZU
        0x0050:  aa56 0000 0000 31c0 8067 7368 6170 6972  .V....1..gshapir
        0x0060:  6fc0 8035 c080 676e 7377 6972 656c 6573  o..5..gnswireles
        0x0070:  73c0 8039 37c0 8031 c080 3134 c080 436f  s..97..1..14..Co
        0x0080:  6e6e 6563 7420 746f 201b 5b6c 6d68 7474  nnect.to..[lmhtt
        0x0090:  703a 2f2f 746c 732e 7365 6e64 6d61 696c  p://tls.sendmail
        0x00a0:  2e63 6f6d 1b5b 786c 6dc0 8036 33c0 803b  .com.[xlm..63..;
        0x00b0:  30c0 8036 34c0 8030 c080 3130 3032 c080  0..64..0..1002..
        0x00c0:  31c0 8032 3036 c080 32c0 80              1..206..2..

So either Adium or libgaim is converting any host to a URL.

Change History (27)

comment:1 Changed 15 years ago by huw.rowlands@…

IMHO, url-ification should work like it does in X-Chat Aqua, where only those links with http:// are url-ificated.

Sure, a lot of people would whinge that www.some.thing doesn't url-ificate anymore, but Adium would at least have correct behaviour.

comment:2 Changed 15 years ago by chr

adium should never append anything to outgoing messages ... for incoming messages, i think it's ok for adresses like eg www.domain.com to be clickable.

comment:3 Changed 15 years ago by Chris Forsythe

Milestone: Adium X 0.82Adium X 0.90
priority: normallowest
Severity: normaltrivial

The behavior has been fine for a very long time, and for the rather vocal minority is somewhat a problem. Setting to .90 so that this can be discussed further

comment:4 Changed 15 years ago by adium-trac-url@…

Ok, I can understand the priority change but must admit I'm not that crazy about the severity change. Just because the bug has been there a long time doesn't make it trivial.

Any chance you acn at least give me a clue on where in the source to start looking so I can fix it in my copy?

comment:5 Changed 15 years ago by adamiser

The issue here is not "Overzealous URL-ification", but the incorrect appending of http:// to the message body. Is this a yahoo specific issue? Does yahoo not support URL titles?

comment:6 Changed 15 years ago by adium-trac-url@…

adamiser: No, it is not Yahoo only. Keep in mind that Adium is adding it, not the Yahoo server as you see it in the tcpdump trace leaving my machine heading for Yahoo's servers.

Here are tcpdump examples for AOL and MSN showing the same thing:

15:37:26.364769 IP 192.168.121.5.51473 > 64.12.24.136.aol: P 6:194(188) ack 1 wi
n 65535
        0x0000:  0009 5b3d 43e6 0030 6520 5e66 0800 4500  ..[=C..0e.^f..E.
        0x0010:  00e4 c35a 4000 4006 e477 c0a8 7905 400c  ...Z@.@..w..y.@.
        0x0020:  1888 c911 1446 583b 6245 84c7 21b5 5018  .....FX;bE..!.P.
        0x0030:  ffff 7b71 0000 2a02 003e 00b6 0004 0006  ..{q..*..>......
        0x0040:  0000 0000 0050 c33a 1e0f c02c 4455 0001  .....P.:...,DU..
        0x0050:  0b67 6e73 7769 7265 6c65 7373 0002 007e  .gnswireless...~
        0x0060:  0501 0004 0101 0102 0101 0072 0000 0000  ...........r....
        0x0070:  3c48 544d 4c3e 436f 6e6e 6563 7420 746f  <HTML>Connect.to
        0x0080:  203c 6120 6872 6566 3d22 6874 7470 3a2f  .<a.href="http:/
        0x0090:  2f74 6c73 2e73 656e 646d 6169 6c2e 636f  /tls.sendmail.co
        0x00a0:  6d22 2074 6974 6c65 3d22 6874 7470 3a2f  m".title="http:/
        0x00b0:  2f74 6c73 2e73 656e 646d 6169 6c2e 636f  /tls.sendmail.co
        0x00c0:  6d22 3e74 6c73 2e73 656e 646d 6169 6c2e  m">tls.sendmail.
        0x00d0:  636f 6d3c 2f61 3e3c 2f48 544d 4c3e 0003  com</a></HTML>..
        0x00e0:  0000 0008 000c 0000 0c3e 0001 738b 429b  .........>..s.B.
        0x00f0:  94b0                                     ..
15:41:20.471573 IP 192.168.121.5.51518 > baym-sb66.msgr.hotmail.com.msnp: P 84:2
73(189) ack 120 win 65535 <nop,nop,timestamp 898869248 15558505>
        0x0000:  0009 5b3d 43e6 0030 6520 5e66 0800 4500  ..[=C..0e.^f..E.
        0x0010:  00f1 c52e 4000 4006 ffb9 c0a8 7905 cf2e  ....@.@.....y...
        0x0020:  6c42 c93e 0747 59f4 8776 6e43 c58a 8018  lB.>.GY..vnC....
        0x0030:  ffff a600 0000 0101 080a 3593 a800 00ed  ..........5.....
        0x0040:  6769 4d53 4720 3320 4120 3137 360d 0a4d  giMSG.3.A.176..M
        0x0050:  494d 452d 5665 7273 696f 6e3a 2031 2e30  IME-Version:.1.0
        0x0060:  0d0a 436f 6e74 656e 742d 5479 7065 3a20  ..Content-Type:.
        0x0070:  7465 7874 2f70 6c61 696e 3b20 6368 6172  text/plain;.char
        0x0080:  7365 743d 5554 462d 380d 0a55 7365 722d  set=UTF-8..User-
        0x0090:  4167 656e 743a 2047 6169 6d2f 312e 322e  Agent:.Gaim/1.2.
        0x00a0:  300d 0a58 2d4d 4d53 2d49 4d2d 466f 726d  0..X-MMS-IM-Form
        0x00b0:  6174 3a20 464e 3d4d 5325 3230 5361 6e73  at:.FN=MS%20Sans
        0x00c0:  2532 3053 6572 6966 3b20 4546 3d3b 2043  %20Serif;.EF=;.C
        0x00d0:  4f3d 303b 2050 463d 300d 0a0d 0a43 6f6e  O=0;.PF=0....Con
        0x00e0:  6e65 6374 2074 6f20 6874 7470 3a2f 2f74  nect.to.http://t
        0x00f0:  6c73 2e73 656e 646d 6169 6c2e 636f 6d    ls.sendmail.com

comment:7 Changed 15 years ago by adamiser

The AIM packet dump doesn't show the http:// added to the message body, but added to the link attribute - this is the correct behavior. The problem seems to be that yahoo doesn't do links with custom titles so libgaim is just substituting the link address.

comment:8 Changed 15 years ago by adium-trac-url@…

I don't see how that is any better. I gave a hostname. Not all hostnames are URLs. That is the basic problem. That host doesn't run a web server, why assume http:// is a valid protocol to contact it. It doesn't matter *where* the http:// is added, what matters it is added when it shouldn't be.

comment:9 Changed 15 years ago by mloftis@…

Adding a note here that I'm experiencing the same problem and have the same complaint. My suggestion is to make it a configurable/preference. Default it to on, then those of us who want it off can turn it off. For me it's making Adium hard to use because it eats config statements and the like. Tkt #749 was labelled as duplicate of this so I'm adding my complaint to this one.

comment:10 Changed 15 years ago by mloftis@…

Excuse me the duplicate was #742 -- my mistake!

comment:11 Changed 15 years ago by Augie Fackler

Milestone: Adium X 0.90 (Old)Adium X 1.0

comment:12 Changed 14 years ago by R.I.Pienaar

I agree this is so after about 4 months of Adium use the single most annoying "feature" for me, it applies to MSN as well as other protocols. Personally I'd like to see a option to just disable this feature all together. That will keep boths camps happy.

comment:13 Changed 14 years ago by adium-trac-url@…

It turns out it is a simple one line fix for this. Of course, it could be made better by making it configurable. However, for all of those suffering because of this, here is the fix. All you need to do (as the patch below shows) is change the arg for initWithStrictChecking from NO to YES in Source/AUAutoLinkingPlugin.m.

Index: Source/AIAutoLinkingPlugin.m
===================================================================
--- Source/AIAutoLinkingPlugin.m	(revision 13207)
+++ Source/AIAutoLinkingPlugin.m	(working copy)
@@ -31,7 +31,7 @@
  */
 - (void)installPlugin
 {
-	hyperlinkScanner = [[SHHyperlinkScanner alloc] initWithStrictChecking:NO];
+	hyperlinkScanner = [[SHHyperlinkScanner alloc] initWithStrictChecking:YES];
 
 	[[adium contentController] registerContentFilter:self ofType:AIFilterDisplay direction:AIFilterIncoming];
 	

comment:14 Changed 14 years ago by Peter Hosey

the problem with that one-line fix is, it will disable the auto-linking of things like www.adiumx.com.

comment:15 Changed 14 years ago by adium-trac-url@…

boredzo: Yes, it will. But that is the whole point. Just because I type 'www.adiumx.com' doesn't mean I want it to be an HTTP URL. What if the sentence was "SSH to www.adiumx.com and fix the web server". That would be received as "SSH to http://www.adiumx.com and fix the web server". Wouldn't I look like an ass of a sysadmin telling someone to SSH to an HTTP URL (though my father still thinks the web == the Internet)? If I want to give someone a URL, I give the http:// prefix, maybe I'm old fashioned.

Even after the one line change, that still gets linkified so all is good. Also, people who want to type in links without using the prefix can do so with the "Add/Edit Hyperlink" button that appears in the toolbar of the IM window.

Obviously, the best of both worlds would be to make it configurable (and I wouldn't complain if the current behavior were the default) so those of us who use hostnames for more than just HTTP URLs can disable it. However, since this bug was targeted as "trivial" with "lowest" priority for version 1.0 (which may be a while), I wanted to provide some relief for those who wanted it. The patch isn't meant to be taken as is until Adium as clearly some (most?) feel it is important to URL-ify every hostname.

comment:16 Changed 14 years ago by adium-trac-url@…

PS Another item lost by my change is turning mail addresses into mailto: links. When the Adium developers work on this, it might be good to separate out the SH_URL_DEGENERATE and SH_MAILTO_DEGENERATE cases in SHHyperlinkScanner.m so that they can be controlled separately. I can definitely see an argument for wanting to turn e-mail addresses into links but not hostnames.

comment:17 Changed 14 years ago by mailto.ill@…

I think we should not alter outgoing messages anyway. It's a job for a recipient (for CLI clients, such a micq, it's fully useless to prepend addresses with mailto: or http://). So now I should write my email as mailto dot ill at gmail dot com, because, in other way, recipient see "mailto:mailto.ill@…" and trying to insert this construction in field "to" or strip this to "ill@…", and both methods are incorrect.

comment:18 Changed 14 years ago by Owen

For anyone who works with a technical audience, the automatic modification of outgoing messages is infuriating. Auto-linkification of incoming messages is fine as long as the display isn't changed - that seems to be working already. When I send the name of a file and blah.pl gets turned into http://blah.pl, something is definitely wrong.

Worse is that there's no indication from the sending side, so my messages look fine. I think the vocal minority is a minority just because others are unaware.

comment:19 Changed 14 years ago by Evan Schoenberg

Milestone: Adium X 1.0Adium X 0.90

comment:20 Changed 14 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

(In [13421]) Don't autolinkify outgoing text until it is to be displayed. We're going to let clients handle this rather trying to decide for them; if the remote side handles incoming links [as we do] and linkifies them, great. If it doesn't, the remote user can get a better IM client, or copy/paste manually. Closes #249

comment:21 Changed 14 years ago by Evan Schoenberg

(In [13422]) Merged [13421]: Don't autolinkify outgoing text until it is to be displayed. We're going to let clients handle this rather trying to decide for them; if the remote side handles incoming links [as we do] and linkifies them, great. If it doesn't, the remote user can get a better IM client, or copy/paste manually. Closes #249

comment:22 Changed 14 years ago by adium-trac-url@…

Resolution: fixed
Status: closedreopened

Evan, thank you very much for the fix, especially for putting it on the 0.8 branch. Unfortunately, it only fixes half of the problem. Your fix prevents me from looking bad when sending out a filename such as sendmail.cf or foo.pl or hostname such as imap.sendmail.org *unless* I am talking to another Adium user, in which case Adium still converts the filename or hostname to an http:// URL when the message is received. I understand we may have different mindsets since you wrote that users should "get a better IM client" if there client doesn't turn myscript.pl into a link and I don't agree that a client that does is better.

Please consider making this optional, even if not until 0.9.

comment:23 Changed 14 years ago by Evan Schoenberg

Yes, another Adium client will still show the information as a link... if you type imap.sendmail.org, it will be clickable. However, it will not display as http://imap.sendmail.org. If you send me the message:

Set your server to imap.sendmail.org

it is clearly improper behavior for me to see

Set your server to http://imap.sendmail.org

However, it is perfectly reasonable for me to see the imap.sendmail.org as a link -- while in this specific case you don't want me to click it, I warrant that over 90% of link-like things which an Adium user receives are intended to be clicked.

comment:24 Changed 14 years ago by Evan Schoenberg

Resolution: fixed
Status: reopenedclosed

If the behavior is not as I described above, please reopen, as http:// should not be prepended. If it is as above, I'm closing this as fixed.

comment:25 Changed 11 years ago by Zachary West

Component: Core AdiumAdium Core

comment:26 Changed 8 years ago by Julian Mehnle

Could the receiver-side URLification be made an option so I can turn it off?

comment:27 Changed 8 years ago by Thijs Alkemade

jmehnle: This is a different issue that has been fixed 7 years ago, if you want to request a new feature, please open a new ticket.

Note: See TracTickets for help on using tickets.