Closed Bug 275101 Opened 20 years ago Closed 8 years ago

No error message for improper url with invalid 5 digit port

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: patrick.bugs, Assigned: CuveeHsu)

Details

(Keywords: helpwanted, Whiteboard: [necko-active])

Attachments

(1 file)

When giving the URL as an invalid port number that is above the maximum allowed
TCP portnumber, no error message is displayed saying that it is an invalid url.
For example, going to http://www.mozilla.com:99999/WHATEVER just leaves the
browser in the same state and does not change the page content or produce an
error message indicating that the page cannot be loaded.

Steps to reproduce:

1. Visit any webpage
2. Give a url like http://www.foo.com:88888/ in the address bar
3. Watch in amazement as no error is produced, the address bar stays at
http://www.foo.com:88888/, page content remains the same, and no error dialogue
is presented to the user.
-> core : networking
Status: UNCONFIRMED → NEW
Component: Location Bar and Autocomplete → Networking
Ever confirmed: true
Product: Firefox → Core
Version: 1.0 Branch → Trunk
Keywords: helpwanted
Target Milestone: --- → Future
Assignee: bugs → nobody
QA Contact: davidpjames → networking
Whiteboard: [necko-active]
Assignee: nobody → mcmanus
Assignee: mcmanus → nobody
Whiteboard: [necko-active] → [necko-backlog]
I've tried a trivial patch.
This patch will redirect foo.com:80000 to search engine, not showing "This address is restricted"

Is the behaviour acceptable, valentin?
Assignee: nobody → juhsu
Flags: needinfo?(valentin.gosu)
Yes, but I believe we tried that before and there were some test failures.
If it's all green on try, it sounds good to me.
Flags: needinfo?(valentin.gosu)
Just found we have handled invalid ports in bug 780522.
Let met investigate it.
Whiteboard: [necko-backlog] → [necko-active]
I've tested version 48 and nightly. 
It would not hanging there, keep the invalid address in the location bar.
The behavior is as what we normally do for loading improperly: empty the address bar.
(Such as bug 1163981 comment 6)

I'm sorry that I can tell which patch fix this, but I guess we can resolved as worksforme.
How do you think, valentin?
Flags: needinfo?(valentin.gosu)
Resolved WORKSFORME due to comment 6.
Keep the ni? for valentin for tracking.
Feel free to reopen it if anyone has another thought.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Yes, this bug is no longer valid.
However, I think we still need to deal with invalid ports.
For example this should throw an error because the port is invalid.
> var url = new URL("http://example.com:99999"); url.port
I thought there would be another bug for this, but I wasn't able to find it.
Junior, do you know of a bug? If not, let's file one.
Flags: needinfo?(valentin.gosu) → needinfo?(juhsu)
(In reply to Valentin Gosu [:valentin] from comment #8)
> Yes, this bug is no longer valid.
> However, I think we still need to deal with invalid ports.
> For example this should throw an error because the port is invalid.
> > var url = new URL("http://example.com:99999"); url.port
> I thought there would be another bug for this, but I wasn't able to find it.
> Junior, do you know of a bug? If not, let's file one.

No, I don't know and can not find it, either.
Flags: needinfo?(juhsu)
I file bug 1300052
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: