Closed
Bug 156307
Opened 24 years ago
Closed 24 years ago
Mail doesn't create a title tag for print document
Categories
(Core :: Printing: Output, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 156650
mozilla1.0.1
People
(Reporter: rods, Assigned: rods)
Details
(Keywords: crash)
Attachments
(1 file, 4 obsolete files)
|
1.30 KB,
patch
|
Details | Diff | Splinter Review |
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0.1
| Assignee | ||
Comment 1•24 years ago
|
||
simply creates a "title" tag with the subject in it. This enables the printed
mail msgs to display the subject as the title in the progress dialog and on the
printed page
Comment 2•24 years ago
|
||
Comment on attachment 90519 [details] [diff] [review]
patch
This is not good at all as the subject of a messager can contains <...> data
which could be interpretted as html. We need first to call nsEscapeHTML to
sanitize the subject. Don't need to check mDocHeader, we check already for it 3
line above. Also, should we free val?
Attachment #90519 -
Flags: needs-work+
Comment 3•24 years ago
|
||
This patch takes care of my concerns. Rods, can you test it to see if it solves
your problem?
Attachment #90519 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•24 years ago
|
||
Comment on attachment 90536 [details] [diff] [review]
Proposed fix, v2
wow, my patch was embaressingly bad, I guess I really shouldn't work on a
holiday weekend :)
This patch works great r=rods
Attachment #90536 -
Flags: review+
Comment 5•24 years ago
|
||
Comment on attachment 90536 [details] [diff] [review]
Proposed fix, v2
I think we're just using strlen, not nsCRT::strlen, for char *'s - other than
that, sr=bienvenu
Attachment #90536 -
Flags: superreview+
Comment 6•24 years ago
|
||
Comment on attachment 90536 [details] [diff] [review]
Proposed fix, v2
since you know the length of buf, how about using snprintf which is safer.
subject is a char *, so use strlen(), instead of nsCRT::strlen()
Attachment #90536 -
Flags: superreview+
Comment 7•24 years ago
|
||
Addressed reviewers' comment.
Attachment #90536 -
Attachment is obsolete: true
Comment 8•24 years ago
|
||
Comment on attachment 90539 [details] [diff] [review]
Proposed fix, v3
carry over r=rods
Attachment #90539 -
Flags: review+
Comment 9•24 years ago
|
||
Comment on attachment 90539 [details] [diff] [review]
Proposed fix, v3
isn't the <title> supposed to come after the <html> and <head> tags?
Comment 10•24 years ago
|
||
Rods, can you answer comment #9
| Assignee | ||
Comment 11•24 years ago
|
||
ok, eberything should be in the right place now and note that it is using
PR_snprintf
Comment 12•24 years ago
|
||
Comment on attachment 90555 [details] [diff] [review]
Proposed fix, v4
R=ducarroz
Attachment #90555 -
Flags: review+
Comment 13•24 years ago
|
||
Comment on attachment 90555 [details] [diff] [review]
Proposed fix, v4
sr=sspitzer, once you fix PR_Free(subject) to be nsMemory::Free(subject)
nsEscapeHTML() allocates with nsMemory::Alloc(), so we need to use
nsMemory::Free()
Attachment #90555 -
Flags: review+ → superreview+
| Assignee | ||
Comment 14•24 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 15•24 years ago
|
||
this fix caused bug 156650. If you plane to land this fix in the branch, you
will have to land fix for bug 156650 too.
Comment 16•24 years ago
|
||
new topcrash, rank 8, due to the patch checked in. the talkback team apologizes
for not having line numbers (it will be remedied soon), nevertheless, below is
the call stack:
nsEscapeHTML()
nsMimeHtmlDisplayEmitter::EndHeader()
mimeEmitterEndHeader()
MimeMessage_write_headers_html()
MimeMessage_close_headers()
MimeMessage_parse_line()
convert_and_send_buffer()
mime_LineBuffer()
MimeObject_parse_buffer()
mime_display_stream_write()
nsStreamConverter::OnDataAvailable()
nsDocumentOpenInfo::OnDataAvailable()
nsMailboxProtocol::ReadMessageResponse()
nsMailboxProtocol::ProcessProtocolState()
nsMsgProtocol::OnDataAvailable()
nsOnDataAvailableEvent::HandleEvent()
nsARequestObserverEvent::HandlePLEvent()
PL_HandleEvent()
PL_ProcessEventsBeforeID()
processQueue()
nsVoidArray::EnumerateForwards()
nsAppShell::ProcessBeforeID()
handle_gdk_event()
libgdk-1.2.so.0 + 0x17dd4 (0x4035ddd4)
libglib-1.2.so.0 + 0x10c46 (0x4038fc46)
libglib-1.2.so.0 + 0x11273 (0x40390273)
libglib-1.2.so.0 + 0x1143c (0x4039043c)
libgtk-1.2.so.0 + 0x9276c (0x402a876c)
nsAppShell::Run()
nsAppShellService::Run()
main1()
main()
libc.so.6 + 0x1d7ee (0x404ba7ee)
could it be that |GetHeaderValue| is returning garbage?
in nsMimeHtmlEmitter.cpp:
312 char *subject = nsEscapeHTML(GetHeaderValue(HEADER_SUBJECT, mHeaderArray));
Severity: normal → blocker
Status: RESOLVED → REOPENED
Keywords: crash,
zt4newcrash
Resolution: FIXED → ---
Comment 17•24 years ago
|
||
we have an open bug for the crash already (bug 156650) Don't need to reopen this
one...
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Updated•24 years ago
|
QA Contact: sujay → esther
Comment 18•24 years ago
|
||
Note for qa when verifying the original problem noted in this bug: The fix is
to replace the http location title at the top right side of the printed mail
message with the Subject of the message being printed.
| Assignee | ||
Updated•24 years ago
|
Status: REOPENED → ASSIGNED
| Assignee | ||
Comment 20•24 years ago
|
||
Now we make sure we have a valid string before escaping it.
Attachment #90539 -
Attachment is obsolete: true
Attachment #90555 -
Attachment is obsolete: true
Comment 21•24 years ago
|
||
I have already a fix for the crash which is waiting for trunk approval! see bug
156650
Comment 22•24 years ago
|
||
*** Bug 156650 has been marked as a duplicate of this bug. ***
Comment 23•24 years ago
|
||
I cannot land the fix I made in bug 156650 as rods backout the fix that cause
the crash. Let use this bug now...
Comment 24•24 years ago
|
||
Comment on attachment 90877 [details] [diff] [review]
patch v5
Instead of having to calculate the size of the string, then allowing a buffer
which by the way you are not checking the result, you can just use
PR_smprintf...
| Assignee | ||
Comment 25•24 years ago
|
||
Bug 156650 already has patch and approvals
*** This bug has been marked as a duplicate of 156650 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•