Closed
Bug 1507138
Opened 5 years ago
Closed 5 years ago
Proxy-API (proxy.settings): Handling of a default port 80
Categories
(WebExtensions :: General, defect, P1)
Tracking
(firefox65 fixed)
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: WebAssistant, Assigned: mixedpuppy)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0 Steps to reproduce: ::: script ::: let proxySetting = { proxyType: "manual", http: "proxy.org:80", ssl: "proxy.org:80" }; browser.proxy.settings.set({value:proxySetting}) .then(()=>{ browser.proxy.settings.get({}) .then((got) => { console.log(got.value); }); }); Actual results: If a port 80 is passed by a script, it will be deleted accoording to the log. In the GUI (General / Network Proxy / Settings...), the port is then displayed with the value zero and Firefox will also use the value zero in the following for a proxy. ::: log ::: autoConfigUrl: "" autoLogin: false ftp: "" http: "proxy.org" httpProxyAll: false passthrough: "localhost, 127.0.0.1" proxyDNS: false proxyType: "manual" socks: "" socksVersion: 5 ssl: "proxy.org" ::: about:config ::: network.proxy.http_port = 0 network.proxy.ssl_port = 0 Expected results: The specified port 80 must be retained. It seems that special error handling for port 80 is also present in other protocols, e.q. ssl, ftp.
Updated•5 years ago
|
Component: Untriaged → Networking
Product: Firefox → Core
![]() |
||
Updated•5 years ago
|
Component: Networking → General
Product: Core → WebExtensions
Assignee | ||
Updated•5 years ago
|
Flags: needinfo?(mixedpuppy)
Assignee | ||
Comment 1•5 years ago
|
||
We use URL to parse the input, it is stripping the port if it is the default port, leaving the pref set to zero. If the port is zero, nsProtocolProxyService ignores the proxy.
Assignee: nobody → mixedpuppy
Flags: needinfo?(mixedpuppy)
Priority: -- → P1
Assignee | ||
Comment 2•5 years ago
|
||
Reporter | ||
Comment 3•5 years ago
|
||
Again an example: All protocols should use port 80. ::: script ::: let proxySetting = { proxyType: "manual", http: "proxy.org:80", ssl: "proxy.org:80", ftp: "proxy.org:80", socks: "proxy.org:80" }; browser.proxy.settings.set({value:proxySetting}); ::: Result ::: All ports are set to 0 ::: about:config ::: network.proxy.http_port = 0 network.proxy.ssl_port = 0 network.proxy.ftp_port = 0 network.proxy.socks_port= 0 It is expected that the port remains unchanged. Now the example with port 81. let proxySetting = { proxyType: "manual", http: "proxy.org:81", ssl: "proxy.org:81", ftp: "proxy.org:81", socks: "proxy.org:81" }; browser.proxy.settings.set({value:proxySetting}); ::Result::: all ports are set to 81 ::: about:config ::: network.proxy.http_port = 81 network.proxy.ssl_port = 81 network.proxy.ftp_port = 81 network.proxy.socks_port= 81 After our tests, other standard ports will not be changed. So at: ftp 21, ssl 443 und socks 1080 Why is the port 80 changed? We assume this is a mistake. For which detail do you need more information?
Updated•5 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by mixedpuppy@gmail.com: https://hg.mozilla.org/integration/autoland/rev/9b21db074305 fix default port usage with proxy settings, r=aswan
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9b21db074305
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 6•5 years ago
|
||
Will you require manual validation on this bug? if yes please provide some more info on how to correctly test the fix. Thank you
Flags: needinfo?(WebAssistant)
Reporter | ||
Comment 7•5 years ago
|
||
Another error occurs in Firefox 65:
If port 80 is set for the protocols https, ftp, socks, this port will not be adopted.
Instead, the default ports of the respective protocols are output.
Steps to reproduce:
Script
let setProxySetting={
proxyType:"manual",
ssl: "127.0.0.1:80",
ftp: "127.0.0.1:80",
socks:"127.0.0.1:80"
};
browser.proxy.settings.set({value:setProxySetting})
.then(()=>{
browser.proxy.settings.get({})
.then((ps)=>{
let getProxySetting=ps.value;
console.log("ssl ",getProxySetting.ssl);
console.log("ftp ",getProxySetting.ftp);
console.log("socks",getProxySetting.socks);
});
});
Actual results
ssl 127.0.0.1:443
ftp 127.0.0.1:21
socks 127.0.0.1:1080
Expected results
ssl 127.0.0.1:80
ftp 127.0.0.1:80
socks 127.0.0.1:80
Status: RESOLVED → REOPENED
Flags: needinfo?(WebAssistant)
Resolution: FIXED → ---
Assignee | ||
Comment 8•5 years ago
|
||
Please use new bugs rather than closing bugs that landed patches. Opened bug 1532990.
Status: REOPENED → RESOLVED
Closed: 5 years ago → 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•