Closed
Bug 105340
Opened 24 years ago
Closed 23 years ago
Proxy: manual config uses trailing spaces
Categories
(Core :: Networking, defect, P3)
Core
Networking
Tracking
()
VERIFIED
FIXED
mozilla1.2beta
People
(Reporter: benc, Assigned: darin.moz)
References
Details
Attachments
(1 file, 2 obsolete files)
|
23.57 KB,
patch
|
darin.moz
:
review+
rpotts
:
superreview+
|
Details | Diff | Splinter Review |
Mozilla 0.9.5 + Netscape 6.2 (0.9.4, 2001101703) on MacOS X
STEPS:
1- Configure manual proxy preference, but add a trailing space to the hostname
"proxy.server.com "
2- Attempt to connect
OBSERVED:
you get an error about being unable to connect to the host.
EXPECTED:
" " is not valid in an FQDN, so prefs should discard the value.
Hi Darin, this is the bug I was asking you about on IRC today.
| Assignee | ||
Comment 2•23 years ago
|
||
-> me
Assignee: neeti → darin
Target Milestone: Future → mozilla1.2alpha
Darin: I've been thinking that for it would be nice to have some functions that
validate networking parameters (validatedFQDN, validateport). It seems like they
would be good ways of trapping bad preferences and controlling input values.
This would make the user experience better, along with stopping potential
security exploits.
If you were to fix bug 140379, in that manner, you could fix this bug at the
same time.
| Assignee | ||
Comment 4•23 years ago
|
||
benc: good idea.
| Assignee | ||
Comment 5•23 years ago
|
||
fixes bug + some general cleanup.
| Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Keywords: mozilla1.2,
patch
| Assignee | ||
Comment 6•23 years ago
|
||
more cleanup... couldn't help myself :-)
ExamineForProxy had a number of inefficiencies, and since it is called for each
and every URL created, it is probably worthwhile to optimize.
Attachment #97484 -
Attachment is obsolete: true
Keywords: review
Comment 7•23 years ago
|
||
Comment on attachment 97494 [details] [diff] [review]
v2 patch
nit: keep the brace style the same throughout nsProtocolProxyService.h
add a comment to address why we are now stripping ws off of what is returned
from CopyCharPref.
Kill PL_strcmp. Use strcmp.
fix that and r=dougt
Attachment #97494 -
Flags: review+
| Assignee | ||
Comment 8•23 years ago
|
||
will do, thx for the review dougt!
| Assignee | ||
Comment 9•23 years ago
|
||
Attachment #97494 -
Attachment is obsolete: true
| Assignee | ||
Comment 10•23 years ago
|
||
Comment on attachment 98085 [details] [diff] [review]
v2.1 patch
forwarding r=dougt
Attachment #98085 -
Flags: review+
| Assignee | ||
Comment 11•23 years ago
|
||
not critical for 1.2 alpha.
Target Milestone: mozilla1.2alpha → mozilla1.2beta
Comment 12•23 years ago
|
||
one note:
+ if (!pref || !strcmp(pref, "network.proxy.socks_version")) {
+ PRInt32 version;
+ LoadIntPref("network.proxy.socks_version", version);
+ // make sure this preference value remains sane
+ if (version == 4)
+ mSOCKSProxyVersion = 4;
+ else
+ mSOCKSProxyVersion = 5;
it appears that mSOCKSProxyVersion will now default to '5' if LoadIntPref()
fails... where as before, it was '-1'. Do you think this is an issue? OR a
feature ;-)
-- rick
Comment 13•23 years ago
|
||
Attachment #98085 -
Flags: superreview+
| Reporter | ||
Comment 14•23 years ago
|
||
It should always default to 4, for profile migration reasons. Is this a new
problem, or was it always like that?
| Assignee | ||
Comment 15•23 years ago
|
||
rick, benc: i'll make it default to 4 then :)
| Assignee | ||
Comment 16•23 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 17•23 years ago
|
||
The patch to nsProtocolProxyService.{cpp,h} has broken proxy support - the proxy
settings are completely ignored as of this change.
Example:
user_pref("network.http.proxy.version", "1.0");
user_pref("network.proxy.http", "127.0.0.2");
user_pref("network.proxy.http_port", 8000);
user_pref("network.proxy.ssl", "127.0.0.2");
user_pref("network.proxy.ssl_port", 8000);
user_pref("network.proxy.type", 1);
Expected: Error dialog indicating that the HTTP connection failed.
Results: Proxy settings are ignored, and the HTTP connection succeeds.
(Note that valid proxy settings are also ignored, not just the invalid IP
address used in the above demonstration.)
Reverting to nsProtocolProxyService.cpp v1.38 and nsProtocolProxyService.h v1.13
fixes this problem.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 18•23 years ago
|
||
I'm seeing this also with 092304 build under WinXP, luckily Auto Proxy still works.
| Assignee | ||
Comment 20•23 years ago
|
||
whoops! fix checked in... a stray early return was fouling up everything :(
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 21•23 years ago
|
||
*** Bug 170324 has been marked as a duplicate of this bug. ***
Comment 22•23 years ago
|
||
+nsProtocolProxyService::LoadStringPref(const char *aPref, nsCString &aResult)
+nsProtocolProxyService::LoadIntPref(const char *aPref, PRInt32 &aResult)
Could be more reader-friendly to use GetStringPref() / GetIntPref().
Seeing that Load...() in necko, hmmm, it wasn't immediately intuitive that it
wasn't 'loading' something.
| Assignee | ||
Comment 23•23 years ago
|
||
good suggestion.
You need to log in
before you can comment on or make changes to this bug.
Description
•