Closed Bug 317589 Opened 19 years ago Closed 17 years ago

Mail body contains ++ produces error message

Categories

(Thunderbird :: General, defect)

x86
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: richard, Assigned: eagle.lu)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Thunderbird version 1.6a1 (20051123)

A mail message that begins with the following body text (output from a cron job)

+ + date +%m%d%y-%H%M
DATE=112105-0115
+ cd /usr/common/usg/ipm/sql/
+ [ -a ipm.all.sql ]
+ mv ipm.all.sql ipm.all.sql.112105-0115
+ /usr/common/usg/ipm/scripts/ipm_sql all
+ + whoami
USER=ragerber
+ EXENAME=/usr/common/usg/ipm/scripts/ipm_parse
+ [ -n all ]
+ USER=all
+ CTIME=
+ UOUT=all
+ [ all = all ]
+ USER=[a-z]*
+ CTIME=-ctime -1
+ UOUT=all
+ + pwd

generates the following to STDERR (? appears in the shell from which it was
started)

"/desktop/gnome/url-handlers/e+03/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 
over and over....

Reproducible: Always

Steps to Reproduce:
1.Click on email subject in main mail window
2.check output generated in shell from which thunderbird was launched
3.

Actual Results:  
"/desktop/gnome/url-handlers/e+03/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+01/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+01/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+01/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+01/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+01/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+03/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+03/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+03/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+03/command": `+' is an invalid character in key/directory names
GConf Error: Bad key or directory name:
 "/desktop/gnome/url-handlers/e+03/command": `+' is an invalid character in key/directory names


Expected Results:  
Nothing.

I don't see any functionality problems, but could potentially cause errors?
Attached patch patch (obsolete) — Splinter Review
Attachment #266466 - Flags: review?(bzbarsky)
Comment on attachment 266466 [details] [diff] [review]
patch

I'm not qualified to review this code.  Try biesi, or maybe bryner (not sure the latter is even doing reviews).
Attachment #266466 - Flags: review?(bzbarsky)
Attachment #266466 - Flags: review?(mscott)
Comment on attachment 266466 [details] [diff] [review]
patch

It looks ok to me, but unix gnome registry code is about as far outside my area of expertise as one can get. I'm happy doing the initial r= if you get someone else who actually knows about the gnome registry to do a review as well.
Attachment #266466 - Flags: review?(mscott) → review+
Attachment #266466 - Flags: superreview?(bienvenu)
Comment on attachment 266466 [details] [diff] [review]
patch

not me, sorry - I know nothing about the gnome code. I'm not sure who does...you might ask on #developers on irc.mozilla.org
Attachment #266466 - Flags: superreview?(bienvenu)
Assignee: mscott → brian.lu
Status: UNCONFIRMED → NEW
Ever confirmed: true
sayrer says we should think outside the review box here, which is probably a good idea.
Attachment #266466 - Flags: superreview?(cbiesinger)
Attachment #266466 - Flags: review?(chpe)
Comment on attachment 266466 [details] [diff] [review]
patch

>+  if (!app)
>+     g_error_free(error);
>+

gconf_client_get_string can return |NULL| without |error| being set if the key name is valid but the key is not set; so you need to make that check |if (error)| instead.

I do wonder why it looks up the external protocol handler for these strange schemes "e+01" and "e+03" at all; could you get a stack from when this occurs ?
Attachment #266466 - Flags: review?(chpe) → review-
The callstack:
  [1] getAppForScheme(aProtocolScheme = CLASS), line 215 in "nsGNOMERegistry.cpp"
  [2] nsGNOMERegistry::HandlerExists(aProtocolScheme = 0x80458cc "GMT+00"), line 235 in "nsGNOMERegistry.cpp"
  [3] nsOSHelperAppService::ExternalProtocolHandlerExists(this = 0x808ee38, aProtocolScheme = 0x80458cc "GMT+00", aHandlerExists = 0x8045890), line 1255 in "nsOSHelperAppService.cpp"
  [4] nsExternalProtocolHandler::ExternalAppExistsForScheme(this = 0x83c7120, aScheme = CLASS, _retval = 0x8045890), line 410 in "nsExternalProtocolHandler.cpp"
  [5] mozTXTToHTMLConv::ShouldLinkify(this = 0x94e1a58, aURL = CLASS), line 434 in "mozTXTToHTMLConv.cpp"
  [6] mozTXTToHTMLConv::CheckURLAndCreateHTML(this = 0x94e1a58, txtURL = CLASS, desc = CLASS, mode = freetext, outputHTML = CLASS), line 454 in "mozTXTToHTMLConv.cpp"
  [7] mozTXTToHTMLConv::FindURL(this = 0x94e1a58, aInString = 0x94f88c0, aInLength = 70, pos = 41U, whathasbeendone = 14U, outputHTML = CLASS, replaceBefore = 8, replaceAfter = 7), line 574 in "mozTXTToHTMLConv.cpp"
  [8] mozTXTToHTMLConv::ScanTXT(this = 0x94e1a58, aInString = 0x94f88c0, aInStringLength = 70, whattodo = 14U, aOutString = CLASS), line 1186 in "mozTXTToHTMLConv.cpp"
  [9] mozTXTToHTMLConv::ScanTXT(this = 0x94e1a58, text = 0x94f88c0, whattodo = 14U, _retval = 0x8046288), line 1360 in "mozTXTToHTMLConv.cpp"
  [10] MimeInlineTextPlain_parse_line(line = 0x94f87d8 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", length = 70, obj = 0x94eec78), line 465 in "mimetpla.cpp"
  [11] MimeInlineText_convert_and_parse_line(line = 0x94f87d8 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", length = 70, obj = 0x94eec78), line 432 in "mimetext.cpp"
  [12] MimeInlineText_rotate_convert_and_parse_line(line = 0x94f83d0 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", length = 70, obj = 0x94eec78), line 560 in "mimetext.cpp"
  [13] convert_and_send_buffer(buf = 0x94f83d0 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", length = 70, convert_newlines_p = 1, per_line_fn = 0xcdbe59d0 = &`libmail.so`mimetext.cpp`MimeInlineText_rotate_convert_and_parse_line(char*,int,MimeObject*), closure = 0x94eec78), line 185 in "mimebuf.cpp"
  [14] mime_LineBuffer(net_buffer = 0x94edd70 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", net_buffer_size = 70, bufferP = 0x94eeca0, buffer_sizeP = 0x94eeca8, buffer_fpP = 0x94eecb0, convert_newlines_p = 1, per_line_fn = 0xcdbe59d0 = &`libmail.so`mimetext.cpp`MimeInlineText_rotate_convert_and_parse_line(char*,int,MimeObject*), closure = 0x94eec78), line 271 in "mimebuf.cpp"
  [15] MimeInlineText_parse_decoded_buffer(buf = 0x94edd70 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", size = 70, obj = 0x94eec78), line 342 in "mimetext.cpp"
  [16] MimeLeaf_parse_buffer(buffer = 0x94edd70 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", size = 70, obj = 0x94eec78), line 177 in "mimeleaf.cpp"
  [17] MimeMessage_parse_line(aLine = 0x94edd70 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", aLength = 70, obj = 0x92f4aa0), line 240 in "mimemsg.cpp"
  [18] convert_and_send_buffer(buf = 0x94edd70 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n", length = 70, convert_newlines_p = 1, per_line_fn = 0xcdbdbc00 = &`libmail.so`mimemsg.cpp`MimeMessage_parse_line(const char*,int,MimeObject*), closure = 0x92f4aa0), line 185 in "mimebuf.cpp"
  [19] mime_LineBuffer(net_buffer = 0x94f3622 "*** (#1 of 2): 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n*** Last Edit: 2007-04-27 17:15:12 GMT+00:00 alan.coopersmith@sun.com\n\nAlso "wiki" is missing from the dictionary.\n\n*** (#2 of 2): 2007-04-27 19:43:19 GMT+00:00 alan.coopersmith@sun.com\n*** Last Edit: 2007-04-27 19:43:19 GMT+00:00 alan.coopersmith@sun.com\n\n\n=== *Comments* ===============================================================\n\n=== *Evaluation* =============================================================\n\n=== *Suggested Fix* ====" ..., net_buffer_size = 3213, bufferP = 0x92f4ac8, buffer_sizeP = 0x92f4ad0, buffer_fpP = 0x92f4ad8, convert_newlines_p = 1, per_line_fn = 0xcdbdbc00 = &`libmail.so`mimemsg.cpp`MimeMessage_parse_line(const char*,int,MimeObject*), closure = 0x92f4aa0), line 271 in "mimebuf.cpp"
  [20] MimeObject_parse_buffer(buffer = 0x94f2878 "Return-path: <bugmail@sybdb3.sfbay.sun.com>\nReceived: from fe-apac-05.sun.com ([192.18.19.176])\n by sedge2-mail1.singapore.sun.com\n (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))\n with ESMTP id <0JH700H6G23LK0F0@sedge2-mail1.singapore.sun.com> for\n bl149383@sedge2-mail1.Singapore.Sun.COM; Sat, 28 Apr 2007 14:02:09 +0800 (SGT)\nReceived: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com\n (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))\n id <0JH700G011VK9A00@mail-apa" ..., size = 6711, obj = 0x92f4aa0), line 278 in "mimeobj.cpp"
  [21] mime_display_stream_write(stream = 0x95a6f78, buf = 0x94f2878 "Return-path: <bugmail@sybdb3.sfbay.sun.com>\nReceived: from fe-apac-05.sun.com ([192.18.19.176])\n by sedge2-mail1.singapore.sun.com\n (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))\n with ESMTP id <0JH700H6G23LK0F0@sedge2-mail1.singapore.sun.com> for\n bl149383@sedge2-mail1.Singapore.Sun.COM; Sat, 28 Apr 2007 14:02:09 +0800 (SGT)\nReceived: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com\n (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))\n id <0JH700G011VK9A00@mail-apa" ..., size = 6711), line 952 in "mimemoz2.cpp"
  [22] nsStreamConverter::OnDataAvailable(this = 0x94e1bc0, request = 0x8ef7538, ctxt = (nil), aIStream = 0x94e9e58, sourceOffset = 0, aLength = 6711U), line 911 in "nsStreamConverter.cpp"
  [23] nsDocumentOpenInfo::OnDataAvailable(this = 0x92d7f68, request = 0x8ef7538, aCtxt = (nil), inStr = 0x94e9e58, sourceOffset = 0, count = 6711U), line 360 in "nsURILoader.cpp"
  [24] nsStreamListenerTee::OnDataAvailable(this = 0x906ac28, request = 0x8ef7538, context = (nil), input = 0x94ef014, offset = 0, count = 6711U), line 97 in "nsStreamListenerTee.cpp"
  [25] NS_InvokeByIndex_P(0x906ac28, 0x5, 0x5, 0x92cdac0, 0x0, 0x0), at 0xd0fc33d1 
  [26] nsProxyObjectCallInfo::Run(this = 0x92f16a8), line 178 in "nsProxyEvent.cpp"
  [27] nsThread::ProcessNextEvent(this = 0x8081fe0, mayWait = 1, result = 0x8046ff4), line 482 in "nsThread.cpp"
  [28] NS_ProcessNextEvent_P(thread = 0x8081fe0, mayWait = 1), line 227 in "nsThreadUtils.cpp"
  [29] nsBaseAppShell::Run(this = 0x8138558), line 154 in "nsBaseAppShell.cpp"
  [30] nsAppStartup::Run(this = 0x81e8530), line 171 in "nsAppStartup.cpp"
  [31] XRE_main(argc = 1, argv = 0x8047704, aAppData = 0x806117c), line 2842 in "nsAppRunner.cpp"
  [32] main(argc = 1, argv = 0x8047704), line 62 in "nsMailApp.cpp"
Attached patch new patchSplinter Review
Attachment #266912 - Flags: superreview?(cbiesinger)
Attachment #266912 - Flags: review?(chpe)
Attachment #266466 - Attachment is obsolete: true
Attachment #266466 - Flags: superreview?(cbiesinger)
Comment on attachment 266912 [details] [diff] [review]
new patch

I'm not sure I really have reviewer rights, but marking r+ anyway :)
Attachment #266912 - Flags: review?(chpe) → review+
This is fine with me, so I can be your proxy or vice versa :-) Boying, feel free to land this fix once the tree opens (or do you need me to land it for you? )
Attachment #266912 - Flags: superreview?(cbiesinger) → superreview+
(In reply to comment #10)
> This is fine with me, so I can be your proxy or vice versa :-) Boying, feel
> free to land this fix once the tree opens (or do you need me to land it for
> you? )
> 
David, can you help me to check in the patch? I don't have permission to do that. Thanks
fixed on trunk, thx for the patch, Brian, and thx for the reviews.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: