Yahoo mailto handler needs to decode RFC 2368

NEW
Unassigned

Status

()

defect
11 years ago
2 months ago

People

(Reporter: cmtalbert, Unassigned)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [platform-rel-Yahoo!])

Attachments

(1 attachment)

Reporter

Description

11 years ago
This is from bug 413630, comment 62:
Try
http://compose.mail.yahoo.com/?To=joe@example.com&cc=bob@example.com&body=hello
and you'll see that all other arguments past joe@example.com are dropped

Sadly, that's not what we're doing. Instead, we're sending

http://compose.mail.yahoo.com/?To=mailto%3Al10n%40mozilla.com%3Fsubject%3DHi%26body%3Dho

and that yields:

Nothing in new layout for my yahoo account.

If I set it to classic, it tries to send mail to a person called

mailto:l10n@mozilla.com?subject=Hi&body=ho

= STR =
1. Sign into your Y! email account
2. Open another tab and put mailto:noone@mozilla.com?subject=Foo&body=Bar into your Location bar and hit enter

= Expected =
Yahoo should parse the URI string and the subject Foo should be in the subject and Bar should be in the body, and "noone@mozilla.org" should be in the To field.  Note that you can also put CC's in there etc (see RFC 2368)

= Actual =
Either nothing happens or the entire string is used for the "To" field.

= NOTE =
This is not a Firefox bug.  This is a Yahoo Mail bug.  We are merely tracking it here for our side so as to know what the progress is.

Updated

11 years ago
No longer blocks: 413630

Updated

11 years ago
Blocks: 413630
As far as I can tell, the "nothing happens" case crops up when a user is not already authenticated to Yahoo Mail.

Comment 2

11 years ago
hi dan,

thanks for the heads up. I will take a look at it in the yahoo side.

Manuel

Comment 3

11 years ago
I fixed this bug in yahoo mail. Hopefully it will be pushed in our new release.
You can keep this bug open until we roll it out.
Thats great news, thanks Manuel.   Any ETA on when this would roll out?

Comment 5

11 years ago
There seems to be another pitfall here:

When I go to mail.yahoo.com from Berlin, Germany, I end up on 

http://de.mg40.mail.yahoo.com/dc/launch?.rand=....

Now, when I open a mailto: link, I initially get redirected to a german yahoo server, too, and then end up on 

http://us.mg40.mail.yahoo.com/dc/launch?action=compose&YY=67815294&login=1&To=mailto%3Aa%40example.com%3Fsubject%3Dx%26body%3Dy&intl=de&.intl=

I am logged in, I have a yahoo mail window open in the same browser, just different window. Screenshot follows.

Is this a problem with international users of yahoo mail?

Comment 7

11 years ago
Axel,

I cant reproduce it. I tried on of our QA test accounts (DE) and I tried the compose.mail.yahoo.com directly. I was redirected to de.mg0.mail.yahoo.com and the composer launched correctly.

can you try the following? sign in, and type the following URL: 

http://compose.mail.yahoo.com/?To=l10n%40mozilla.com

thanks

Comment 8

11 years ago
Not sure if I'm timing out here. The page takes well over a minute to load, and maybe as much as 1:30. Manual, I did an http log here, I hope you don't mind that I'm sending that to you directly, then I don't have to worry too much about what cookies are in there and whatnot.

Comment 9

11 years ago
hi axel,

i havent got anything..

manueldeschamps@yahoo.com

i can take a look later

thanks

Comment 10

11 years ago
hi axel,

i havent got anything..

manueldeschamps@yahoo.com

i can take a look later

thanks

Comment 11

11 years ago
Tony:

we will start our next rollout soon. It will be a matter of weeks until it gets to all of our farms.

Axel's issue has also being addressed.

Manuel

Comment 12

11 years ago
Manuel is correct, the fix here will be rolled out in the next few weeks.  

Please let us know if there are any additional issues, thanks.  
My Yahoo mail has been updated to 1.2 build 975.23 (April 15, 2008).  The Yahoo mailto handler is now working correctly.
Correction, the basic stuff works.  Anything more advanced doesn't work.

From http://people.mozilla.org/~ctalbert/test-protocol-links.html
only the first three mailto links work as expected.  The other mailto links, do open Yahoo mail and populate some fields, but not all are populated correctly.


Also mailto links will not work unless the user is already logged into Yahoo.  If the user is not logged into Yahoo, then after s/he logs in the compose tab is not opened.

Finally mailto links open a new Yahoo Mail page for every link clicked.  This is annoying since Yahoo mail is really designed to only run in one tab.  This is probably a Firefox issue, but I'm not sure what can be done about it.

Comment 15

11 years ago
Michael, I had tried those links before and believe these are the only ones that do not work:

    * Multiple Lines in Body - the text is there but the line breaks are removed
    * A mailto with embedded ampersands
    * Using in-reply-to

(let me know if they are not working for you)

I will see if I can do something for the first 2. I didnt find number 3 in the RFC spec and I dont see how that would work.


> Also mailto links will not work unless the user is already logged into Yahoo. 
> If the user is not logged into Yahoo, then after s/he logs in the compose tab
> is not opened.

I dont see this behavior. If you want I can look into your problem; please sign out and click on any of those mailto links and send me the login page's url, it has to be something like: 
https://login.yahoo.com/config/mail?.intl=us&.done=http%3A%2F%2Fus.mg0.mail.yahoo.com%2Fdc%2Flaunch%3Faction%3Dcompose%26To%3Dmailto%253Anoone%2540mozilla.org


> Finally mailto links open a new Yahoo Mail page for every link clicked.
This is firefox (security) AND mail (a formal API will be needed to communicate with the app from the outside). Hopefully this feature gets refined after Firefox 3 GA and we can do more cool stuff. I dont like to open Mail every time either but for now it is all we got :D

thanks for checking it..

Manuel
(In reply to comment #15)
>   * Multiple Lines in Body - the text is there but the line breaks are
removed
>   * A mailto with embedded ampersands
>   * Using in-reply-to

Yes, those three don't work.  In addition the following doesn't completely work either because it fails to include addr2@foo.com in the To: field in addition to addr1@foo.com.  It looks like the "to" field (inside the whole To field) is not parsed.

    * Use a mailto and a to header - all addresses should be on To line 


> I dont see this behavior. If you want I can look into your problem; please sign
> out and click on any of those mailto links and send me the login page's url, it
> has to be something like: 
> https://login.yahoo.com/config/mail?.intl=us&.done=http%3A%2F%2Fus.mg0.mail.yahoo.com%2Fdc%2Flaunch%3Faction%3Dcompose%26To%3Dmailto%253Anoone%2540mozilla.org
> 
> 

I clicked on the first mailto case on the test page and it brought me to this URL:

https://login.yahoo.com/config/login_verify2?.intl=&i=OI4hdHNmc3J0SmJ1dXh1IXRkSo5keHh8fmJTfnpiY1hycw%3d%3d&.rand=0.968581877129907&.src=ym

I tried clearing my cookies just to be sure and the same thing happened.
Putting the following URL in the address bar does the same thing:

http://compose.mail.yahoo.com?To=noone@mozilla.org


The http://compose.mail.yahoo.com URL is redirecting to https://login.yahoo.com/config/login_verify2 instead of https://login.yahoo.com/config/mail and dropping the parameters.

My account is currently set up to use the new version of Yahoo mail, but it looks like that doesn't make a difference since I wasn't signed in anyway at the time.  

Comment 17

11 years ago
for the login problem the only way that I think you can work around it is the following:
sign in, go to the options menu (link in the top right corner) and click on Set Y! Mail as default webmail.

That will add Yahoo! Mail as another mailto handler but now instead of compose.mail.yahoo.com, it will use the current hostname, something like us.mg0.mail.yahoo.com .....

let me know if that works for you..

Yes that works fine if I add it manually.

I wonder if it would be better to not include a default Yahoo Mail, if users just have to add it themselves to get it to work correctly?


Also I'll mention that neither Yahoo Mail mailto handler works with Yahoo Mail Classic, which doesn't look like it's been updated.
Reporter

Comment 19

11 years ago
Replies to comments 15 and 14:

I looked back through the links on that page, and I found that the "embedded ampersand" test was missing an ampersand separator between the subject and the body.  That was my fault, so I've corrected that.

I also realized that the "in-reply-to" wasn't so much a part of the RFC.  It was more a part of the RFC where the author was waxing poetic about what "might be done". In light of that, I removed that test and replaced it with one that uses percent encoded UTF-8 characters.  I included a picture of the proper rendering of those characters for easy verification.  I tried to pick characters with encodings across the UTF-8 spectrum for that test.

If you find other issues with the tests there, let me know.  If you find more tests we should include, I'm happy to add them.

Comment 20

11 years ago
Mozilla Team:

quick heads-up, 

I have fixed the last 3 incorrect cases for Michael's tests  (ampersands, multiple lines and ?to= field)

the fix should be rolled out for all our users around june..

let me know if you find any issues at all so I can address them ASAP..


cheers,

Manuel
Great; thanks Manuel!
This is broken again.  

The only thing that works now is the "To" field so all the test cases except for case 1 at http://people.mozilla.org/~ctalbert/test-protocol-links.html now fail to work.

I'm not sure when it broke exactly, but it isn't working in version: 1.5.0
 build: 1155.45 12/01/2008 02:16 PM
Here's some info that may help:

This will work for Yahoo Mail Classic in text/plain composition mode:

http://shadow2531.com/opera/testcases/registerProtocolHandler/yahoo_mail.html?uri=%s

javascript:(function()%7Bwindow.navigator.registerProtocolHandler('mailto'%2C%22http%3A%2F%2Fshadow2531.com%2Fopera%2Ftestcases%2FregisterProtocolHandler%2Fyahoo_mail.html%3Furi%3D%25s%22%2C'Compose%20in%20Yahoo%20Mail%20Classic%20in%20text%2Fplain%20composition%20mode')%3B%7D)()%3B

(With gecko.handlerService.allowRegisterFromDifferentHost set to true)

(test with <http://shadow2531.com/opera/testcases/mailto/modern_mailto_uri_scheme.html#test>)

(For Yahoo Mail Classic + HTML mail composition mode, Yahoo has bugs with the body field value. It will take newlines and convert them to spaces. Representing newlines in the mailto URI's body hvalue as <br> doesn't help.)

This will work in the new UI version:

http://shadow2531.com/opera/testcases/registerProtocolHandler/yahoo_mail.html?uri=%s&newui=true

javascript:(function()%7Bwindow.navigator.registerProtocolHandler('mailto'%2C%22http%3A%2F%2Fshadow2531.com%2Fopera%2Ftestcases%2FregisterProtocolHandler%2Fyahoo_mail.html%3Furi%3D%25s%26newui%3Dtrue%22%2C'Compose%20in%20Yahoo%20Mail%20new%20UI')%3B%7D)()%3B

(With gecko.handlerService.allowRegisterFromDifferentHost set to true)

That one uses "http://us.mg1.mail.yahoo.com/dc/launch?sysreq=ignore&action=compose&login=1&To=&Subj=&Cc=&Bcc=&Body=" instead of "http://compose.mail.yahoo.com/?To=&Subj=&Cc=&Bcc=&Body=" because the redirect that happens in the compose.mail.yahoo.com one will cause the server to choke (if using the new mail UI) on %HH representing newlines in the body value. The us.mg1 URI doesn't have the problem.

Yahoo's new UI has bugs where it will ignore Subj, Cc, Bcc and Body when filling in the fields. It only works with 'To' no matter what you do. And, the Yahoo server takes some characters in the To field and converts them to entities.

The yahoo server can also choke on ' characters. Even though ' is not reserved,  you still need to make sure it's percent-encoded to %27 in the compose URI that's emitted.

Basically, Yahoo doesn't support a "http://compose.mail.yahoo.com/?uri=" URI. It only supports "http://compose.mail.yahoo.com/?To=&Subj=&Cc=&Bcc=&Body=", which requires the To, Subj, Cc, Bcc and Body hvalues to be double-percent-encoded.

Yahoo's just buggy and in addition, doesn't support what registerProtocolHandler emits.
The following link will work for everything except the Body text which is always dropped. It will work regardless if you are using the new UI or not.

http://us.mg.mail.yahoo.com/mc/compose?ymv=0&uc=1&to=%T&Subj=%S&Body=%M&cc=%C&bcc=%B


Yahoo's servers used to work fine, but at some point they broke.  I can confirm that they are still broken with the following release:

version: 2.0.0
  build: 1275
01/14/2009 05:15 PM
(In reply to comment #24)
> The following link will work for everything except the Body text which is
> always dropped. It will work regardless if you are using the new UI or not.
> 
> http://us.mg.mail.yahoo.com/mc/compose?ymv=0&uc=1&to=%T&Subj=%S&Body=%M&cc=%C&bcc=%B

Ah, I see that it loads the classic compose page whether you're using the new UI or not.

FWIW, http://us.mg.mail.yahoo.com/mc/compose?ymv=0&uc=1&to=1&Subj=2&Body=3&cc=4&bcc=5 puts 3 in the body no problem. I didn't test with or more advanced body value though.
When I test, it doesn't put 3 in the body, but I have a feeling that's because I was put on the server beta testing the new mail applications.  My mail server has a "b" at the end of it.  See the following link for more info:

http://www.ymailblog.com/blog/2008/12/take-a-tour-of-Yahoo-Mails-new-smarter-inbox
(In reply to comment #26)
> When I test, it doesn't put 3 in the body, but I have a feeling that's because
> I was put on the server beta testing the new mail applications.  My mail server
> has a "b" at the end of it.  See the following link for more info:
> 
> http://www.ymailblog.com/blog/2008/12/take-a-tour-of-Yahoo-Mails-new-smarter-inbox

Ah, O.K.

BTW, made use of the http://us.mg.mail.yahoo.com/mc/compose?ymv=0&uc=1 URI. With the following, mailto links will load up the classic compose page fine and work whether using the classic UI or the old UI. (Although Rich text body mode still doesn't support %0D%0A and converts the newline to a space.)

http://shadow2531.com/opera/testcases/registerProtocolHandler/yahoo_mail.html?uri=%s&generic=true

javascript:(function()%7Bwindow.navigator.registerProtocolHandler(%22mailto%22%2C%22http%3A%2F%2Fshadow2531.com%2Fopera%2Ftestcases%2FregisterProtocolHandler%2Fyahoo_mail.html%3Furi%3D%25s%26generic%3Dtrue%22%2C%22Yahoo%20Mail%20Generic%22)%3B%7D)()%3B

(With gecko.handlerService.allowRegisterFromDifferentHost set to true)
Oops, "old UI" -> "new UI".
Note that Flock uses "http://us.mg1.mail.yahoo.com/dc/launch?action=compose&To=&Cc=&Subj=&Body=" for the new Yahoo mail UI and things seem to work fine with it.
Manuel, could you please have a look at the latest comments on this bug? The handling is broken again. It doesn't work with the classic ui at all and with the new ui the subject and body is missing. Thanks!
How bout getting the Yahoo devs to just support "http://compose.mail.yahoo.com/?url=%s"?

, including making sure that it works *completely*:

1. In the classic UI.

2. In the new UI.

3. In text/plain compose mode.

4. In rich text compose mode.

5. *If* you get redirected through the "?sysreq=ignore" page like "http://us.mg2.mail.yahoo.com/dc/launch?sysreq=ignore". (Currently, Yahoo drops all compose data when hitting that page.)

They need to reimplement all their support anyway as it's all screwed up and buggy. Might as well have them do it right, if possible.
While the Y-Mail webmail that comes pre-installed with Firefox still doesn't work (except for a few fields), the version added via the "Set Y!-Mail as default webmail" command in options menu in the new Yahoo mail does work, but only for the new Yahoo Mail (version: 2.0.0, build: 1277.35, 03/13/2009 01:40 PM).  Trying to use it with classic puts up a "switch now" page.

So "http://compose.mail.yahoo.com/?To=%s" doesn't work for either the new or classic version, but "http://us.mg0.mail.yahoo.com/dc/launch?action=compose&To=%s" works for the new version.  Note that the number after mg varies depending on which mail server is being used.
I'll mention that "http://compose.mail.yahoo.com/?To=%s" results in converting to "http://us.mg0.mail.yahoo.com/dc/launch?action=compose&To=%s".  The reason the later works and the former does not, is because the %s field in the former is not escape encoded while the later is.  

So the %s in the former is "mailto:noone@mozilla.org?cc=bob@mozilla.org&amp;subject=subject&amp;body=hello%20world" which doesn't work.

While the %s in the later is "mailto%3Anoone%40mozilla.org%3Fcc%3Dbob%40mozilla.org%26subject%3Dsubject%26body%3Dhello%2520world" which does work.

"mailto%3Anoone%40mozilla.org%3Fcc%3Dbob%40mozilla.org%26subject%3Dsubject%26body%3Dhello%2520world" is actually being sent to http://compose.mail.yahoo.com so Yahoo is incorrectly decoding it before passing it on to the actual mail server address.
Blocks: 539871

Comment 34

9 years ago
There is an open source program for Windows called Gmail Default Maker.  Despite the name, it works with other services including Yahoo.  Its purpose is to allow a webmail composer to be the default mailto handler.

I have tried it with both the Classic and newer Yahoo, and it works perfectly with both.  In Firefox, I selected File/Send Link.  A new tab opened with a Yahoo login screen.  When I logged in, a composing screen opened with the subject and body populated exactly as they should be.

As I said, the program is open source.  So it seems reasonable that you could review the code amd figure out what they are doing right that the internal Firefox function is doing wrong.

The program's home page is:

http://gmaildefault.codeplex.com/
(In reply to comment #34)
> There is an open source program for Windows called Gmail Default Maker. 
> Despite the name, it works with other services including Yahoo.  Its purpose is
> to allow a webmail composer to be the default mailto handler.
> 
> I have tried it with both the Classic and newer Yahoo, and it works perfectly
> with both.  In Firefox, I selected File/Send Link.  A new tab opened with a
> Yahoo login screen.  When I logged in, a composing screen opened with the
> subject and body populated exactly as they should be.

Did you try with:

1. A body that has multiple lines.

2. CC and BCC.

3. CC, BCC and TT fields with will addresses like "Test Name" <test@example.com>

4. #3 with multiple ones like "Test Name1" <test1@example.com>, "Test Name2" <test2@exampel.com>

5. characters like ! in the TO, CC, BCC, Subject and Body fields

?

The reason I ask is that I've found that Yahoo chokes on all kinds of stuff making only very simple composing work.
Also, that's a pretty off-topic discussion. This is about yahoo mail working as the standards say, not about us being able to hack around it if they don't.

Comment 37

8 years ago
Hi,

I wanted to check if %0D%0A is still not supported by Yahoo editor? my mailto link with body consisting %0D%0A- new line is working fine in other e-mails 
like g-mail, hot mail etc, its not working only in yahoo, is there an work around for this?

Thanks in Advance
Naga

(In reply to Michael A. Puls II from comment #27)
> (In reply to comment #26)
> When I test, it doesn't put 3 in the body, but I
> have a feeling that's because
> I was put on the server beta testing the new
> mail applications.  My mail server
> has a "b" at the end of it.  See the
> following link for more info:
> 
>
> http://www.ymailblog.com/blog/2008/12/take-a-tour-of-Yahoo-Mails-new-smarter-
> inbox

Ah, O.K.

BTW, made use of the
> http://us.mg.mail.yahoo.com/mc/compose?ymv=0&uc=1 URI. With the following,
> mailto links will load up the classic compose page fine and work whether
> using the classic UI or the old UI. (Although Rich text body mode still
> doesn't support %0D%0A and converts the newline to a space.)
> http://shadow2531.com/opera/testcases/registerProtocolHandler/yahoo_mail.
> html?uri=%s&generic=true
> javascript:(function()%7Bwindow.navigator.
> registerProtocolHandler(%22mailto%22%2C%22http%3A%2F%2Fshadow2531.
> com%2Fopera%2Ftestcases%2FregisterProtocolHandler%2Fyahoo_mail.
> html%3Furi%3D%25s%26generic%3Dtrue%22%2C%22Yahoo%20Mail%20Generic%22)%3B%7D)(
> )%3B

(With gecko.handlerService.allowRegisterFromDifferentHost set to true)
(In reply to Naga from comment #37)
> Hi,
> 
> I wanted to check if %0D%0A is still not supported by Yahoo editor? my
> mailto link with body consisting %0D%0A- new line is working fine in other
> e-mails 
> like g-mail, hot mail etc, its not working only in yahoo, is there an work
> around for this?
> 
> Thanks in Advance
> Naga

Doesn't seem to be a workaround. <http://compose.mail.yahoo.com/?body=Line1%0D%0ALine2> still doesn't work. Yahoo's compose URI is super buggy. They haven't fixed it after all these years. Time to move on to webmail providers that actually care.

Updated

6 years ago
Blocks: 513780
platform-rel: --- → ?
Whiteboard: [platform-rel-Yahoo!]
platform-rel: ? → ---
You need to log in before you can comment on or make changes to this bug.