Closed Bug 40215 Opened 25 years ago Closed 25 years ago

Unsigned jar files report error to js console

Categories

(SeaMonkey :: General, defect, P3)

All
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: warrensomebody, Assigned: security-bugs)

References

()

Details

(Whiteboard: [nsbeta2+])

Whenever you try to access a file from an unsigned jar file (a perfectly valid thing to do) you end up reporting an error to the js console (nsJAR.cpp line 310): if (!manItem) { => ReportError(aFilename, nsIZipReader::NOT_SIGNED); return NS_OK; } This is erroneous. Furthermore, the code goes on to hit this assertion: NTDLL! 77f7629c() nsDebug::Assertion(const char * 0x100b7cc0, const char * 0x100b7ca8, const char * 0x100b7c6c, int 0x0000001c) line 242 + 13 bytes nsDebug::PreCondition(const char * 0x100b7cc0, const char * 0x100b7ca8, const char * 0x100b7c6c, int 0x0000001c) line 337 + 21 bytes nsConsoleMessage::AddRef(nsConsoleMessage * const 0x031af1a0) line 28 + 35 bytes nsConsoleService::LogMessage(nsConsoleService * const 0x03672280, nsIConsoleMessage * 0x031af1a0) line 108 nsConsoleService::LogStringMessage(nsConsoleService * const 0x03672280, const unsigned short * 0x031ae520) line 173 nsJAR::ReportError(const char * 0x0319cd80, short 0x0000) line 786 nsJAR::GetCertificatePrincipal(nsJAR * const 0x00e9bb70, const char * 0x0319cd80, nsIPrincipal * * 0x0012ef08) line 311 nsJARChannel::GetOwner(nsJARChannel * const 0x0312d080, nsISupports * * 0x0012ef64) line 795 + 57 bytes nsDocument::Reset(nsIChannel * 0x0312d080, nsILoadGroup * 0x02dbbc80) line 856 nsHTMLDocument::Reset(nsIChannel * 0x0312d080, nsILoadGroup * 0x02dbbc80) line 323 + 16 bytes nsDocument::StartDocumentLoad(nsDocument * const 0x031aee60, const char * 0x0035dcac, nsIChannel * 0x0312d080, nsILoadGroup * 0x02dbbc80, nsISupports * 0x02db5cf0, nsIStreamListener * * 0x0012fb64, int 0x00000001) line 880 + 22 bytes nsHTMLDocument::StartDocumentLoad(nsHTMLDocument * const 0x031aee60, const char * 0x0035dcac, nsIChannel * 0x0312d080, nsILoadGroup * 0x02dbbc80, nsISupports * 0x02db5cf0, nsIStreamListener * * 0x0012fb64, int 0x00000001) line 417 + 33 bytes nsLayoutDLF::CreateDocument(const char * 0x0035dcac, nsIChannel * 0x0312d080, nsILoadGroup * 0x02dbbc80, nsISupports * 0x02db5cf0, const nsID & {...}, nsIStreamListener * * 0x0012fb64, nsIContentViewer * * 0x0012fa54) line 408 + 45 bytes nsLayoutDLF::CreateInstance(nsLayoutDLF * const 0x031acfe0, const char * 0x0035dcac, nsIChannel * 0x0312d080, nsILoadGroup * 0x02dbbc80, const char * 0x0012fb24, nsISupports * 0x02db5cf0, nsISupports * 0x00000000, nsIStreamListener * * 0x0012fb64, nsIContentViewer * * 0x0012fa54) line 291 + 37 bytes nsDocShell::NewContentViewerObj(nsDocShell * const 0x02db5cd0, const char * 0x0012fb24, nsIChannel * 0x0312d080, nsILoadGroup * 0x02dbbc80, nsIStreamListener * * 0x0012fb64, nsIContentViewer * * 0x0012fa54) line 2170 + 132 bytes nsDocShell::CreateContentViewer(nsDocShell * const 0x02db5cd0, const char * 0x0012fb24, nsIChannel * 0x0312d080, nsIStreamListener * * 0x0012fb64) line 2114 + 60 bytes nsDSURIContentListener::DoContent(nsDSURIContentListener * const 0x02dbac50, const char * 0x0012fb24, int 0x00000000, const char * 0x10099aa8 gCommonEmptyBuffer, nsIChannel * 0x0312d080, nsIStreamListener * * 0x0012fb64, int * 0x0012fb08) line 100 + 33 bytes nsDocumentOpenInfo::DispatchContent(nsIChannel * 0x0312d080, nsISupports * 0x00000000) line 326 + 109 bytes nsDocumentOpenInfo::OnStartRequest(nsDocumentOpenInfo * const 0x03128580, nsIChannel * 0x0312d080, nsISupports * 0x00000000) line 175 + 16 bytes nsJARChannel::OnStartRequest(nsJARChannel * const 0x0312d084, nsIChannel * 0x0319bb30, nsISupports * 0x00000000) line 859 nsOnStartRequestEvent::HandleEvent(nsOnStartRequestEvent * const 0x031ab7a0) line 212 + 26 bytes nsStreamListenerEvent::HandlePLEvent(PLEvent * 0x031ab690) line 97 + 12 bytes PL_HandleEvent(PLEvent * 0x031ab690) line 575 + 10 bytes PL_ProcessPendingEvents(PLEventQueue * 0x010791a0) line 520 + 9 bytes _md_EventReceiverProc(HWND__ * 0x004603ac, unsigned int 0x0000c0fb, unsigned int 0x00000000, long 0x010791a0) line 1030 + 9 bytes USER32! 77e71820() because nsConsoleMessage is not thread safe and is being called on a file-fetcher thread.
Keywords: nsbeta2
Fix in hand for the incorrect error message in the JS console. Filed bug 40223 re: the threadsafe asserts in nsConsoleMessage. What sort of permission do I need to check this in?
Status: NEW → ASSIGNED
Whiteboard: Fix in hand
Target Milestone: --- → M17
Putting on [nsbeta2+] radar for beta2 fix.
Whiteboard: Fix in hand → [nsbeta2+]
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Sorry for the spam. New QA Contact for Browser General. Thanks for your help Joseph (good luck with the new job) and welcome aboard Doron Rosenberg
QA Contact: jelwell → doronr
verified with 071708 mozilla build on NT.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.