Closed Bug 306409 Opened 17 years ago Closed 17 years ago
Port Access, net Reset and malformed URI errors do not pass URI value for error messages
User-Agent: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.8b4) Gecko/20050829 Firefox/1.0+ Build Identifier: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.8b4) Gecko/20050829 Firefox/1.0+ When attempting to go to a URL containing a port that access is restricted to, there is an unsubstituted %S in the message displayed in the error message page shown. Reproducible: Always Steps to Reproduce: 1. Go to an URI with a restricted port (http://www.mozilla.org:25/ 2. Look at the start of the problem description (below "This address is restricted" Actual Results: Message contains %S. Expected Results: Should probably contain the URI or the host name part of the URI.
Happens on Windows, too.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Version: unspecified → Trunk
Nominating for blocking. This seems related to bug 306481.
I'm not sure that we pass in the URL for deniedPortAccess - I assumed that we did since, well, we do everywhere else. Does anyone know how we'd find that out?
The problem is, indeed, that when malformedURI and deniedPortAccess errors discovered, "simple formatted" error messages are generated and the URI value is not available. http://lxr.mozilla.org/mozilla1.8/source/docshell/base/nsDocShell.cpp#2911 http://lxr.mozilla.org/mozilla1.8/source/docshell/base/nsDocShell.cpp#2935 The solution is either to 1) move these error messages up into the "human readable" section which makes the URI available, which to my admittedly untrained eye doesn't look like it would be *too* difficult/risky: http://lxr.mozilla.org/mozilla1.8/source/docshell/base/nsDocShell.cpp#2842 or, 2) to remove the %S from the strings, at which point I'd suggest: malformedURI=The URL is not valid and cannot be loaded. deniedPortAccess=This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.
Summary: Unsubstituted %S in "Problem loading page" 'friendly' error message. → denied
*** Bug 306481 has been marked as a duplicate of this bug. ***
Summary: denied → deniedPortAccess and malformedURI errors do not pass URI value for error messages
(In reply to comment #4) > 1) move these error messages up into the "human readable" section which makes > the URI available, which to my admittedly untrained eye doesn't look like it > would be *too* difficult/risky: > > http://lxr.mozilla.org/mozilla1.8/source/docshell/base/nsDocShell.cpp#2842 This part I would also suggest. This shouldn't be create any regression.
*** Bug 306558 has been marked as a duplicate of this bug. ***
And also redirectLoop and netReset and unknownSocketType
Assignee: nobody → mscott
Flags: blocking1.8b5? → blocking1.8b5+
Again, should be a simple matter of moving those error cases up into the "human readable" section and passing along the URI. If, for whatever reason, it's felt that's too risky and we need new strings that don't use the %S, I'd suggest: redirectLoop=Firefox has detected that the server is redirecting the request for this address in a way that will never complete. netReset=The connection to the server was reset while the page was loading.
This is late-l10n, right?
It's only late-l10n if we change the strings, which I'm hoping we don't have to do.
Strings within appstrings.properties have to be customized (%S as placeholder for the URL) when we want to use the FormatStringFromName function. So the changes are definetely late-l10n.
Per the triage meeting today, we'll only take fixing the strings for 1.8. Feel free to file a new bug for trunk changes to move the location where we handle and parse these strings in nsDocshell. If you make that change though you'll probably have to change the original properties file as well. per the triage meeting today, this bug should have the late-l10n keyword. Thanks to Axel for adding it there already I see.
Comment on attachment 194586 [details] [diff] [review] the fix Thanks, Scott.
fixed on the trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Scott, where is your patch which fixes that part on the trunk? I can't see it anywhere and Mike didn't reviewed it: http://tinderbox.mozilla.org/bonsai/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&cvsroot=/cvsroot&date=explicit&mindate=1125610680&maxdate=1125611090&who=scott%25scott-macgregor.org
after this is verified on the trunk, we'll consider for branch approval.
I have no idea what your talking about Hendrik. Your link shows my checkin. And this bug shows an r=mike
(In reply to comment #18) > I have no idea what your talking about Hendrik. Your link shows my checkin. And > this bug shows an r=mike Your patch (attachment 194586 [details] [diff] [review]) wich got r= from Mike is the fix for the 1.8 branch but not for the trunk. That was my concern.
Comment on attachment 194586 [details] [diff] [review] the fix This patch changes the semantics of the strings, but their names didn't change. This makes verifying the fix in localizations much harder than necessary.
*** Bug 306818 has been marked as a duplicate of this bug. ***
Summary: deniedPortAccess and malformedURI errors do not pass URI value for error messages → deniedPortAccess, netReset and malformedURI errors do not pass URI value for error messages
For the trunk (at least), can't we fix docshell instead?
(In reply to comment #22) > For the trunk (at least), can't we fix docshell instead? Opened bug 306833 for that purpose.
verified Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050902 Firefox/1.6a1
Status: RESOLVED → VERIFIED
Comment on attachment 194586 [details] [diff] [review] the fix Let's get this landed on the branch ASAP. Thanks!
Attachment #194586 - Flags: approval1.8b4? → approval1.8b4+
fixed on the branch
The following localizations have a %S in malformedURI, redirectLoop, unknownSocketType, netReset and deniedPortAccess still: danish (da), german (de), hungarian (hu), dutch (nl), slovak (sk) (Slovak just for deniedPortAccess and redirectLoop)
(In reply to comment #27) > The following localizations have a %S in malformedURI, redirectLoop, > unknownSocketType, netReset and deniedPortAccess still: > > danish (da), german (de), hungarian (hu), dutch (nl), slovak (sk) > > (Slovak just for deniedPortAccess and redirectLoop) fixed in nl
fixed for da /Søren
Fixed for de
I forgot to mention hebrew (he), which is broken too. Topal, you didn't catch netReset.
missed that one, done.
Fixed for sk-SK
You need to log in before you can comment on or make changes to this bug.