Closed
Bug 62029
Opened 25 years ago
Closed 25 years ago
strncasecmp should be strcasecmp
Categories
(Core Graveyard :: Security: UI, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: morse, Assigned: ddrinan0264)
Details
The following line of code appears in nsSecureBrowserUIImpl.cpp.
if ( PL_strncasecmp(host, "127.0.0.1", 9) == 0 ) {
Is there a reason for the strncasecmp rather than a straight strcasecmp as
follows:
if ( PL_strcasecmp(host, "127.0.0.1") == 0 ) {
Also there is a line
if (PL_strncasecmp(password, (const char*)control->nonce.data,
control->nonce.len) == 0) {
Again, should that be a straight compare. If it is a length compare, shouldn't
the length be 5 instead of 9.
This code segment was copied to wallet.cpp as well, so if it is wrong it needs
to be fixed in both files.
Comment 1•25 years ago
|
||
Nine lines down from the first PL_strncasecmp Steve cites is another one, of the
form PL_strncasecmp(password, secmanPassword, 9), which pretty clearly should be
PL_strcmp(password, secmanPassword) -- that is, neither case-independent nor
bounded by 9 chars!
/be
Comment 2•25 years ago
|
||
Reporter, is this still relevant now that PSM 2.0 is integrated into the nightly
builds?
| Reporter | ||
Comment 3•25 years ago
|
||
I'm not the one who can answer that since I don't know what you derived PSM2.0
from. If the file in question here is no longer used, and the comparabible file
in PSM2.0 hasn't copied this bug, then this is no longer relevant. The
implementers of PSM2.0 are the ones who would know if this is still relevant or
not.
| Assignee | ||
Comment 4•25 years ago
|
||
PSM 2.0 is now part of the mozilla and commercial builds and has fixed alot of
UI and ssl bugs that were in PSM 1.X. I'm doing a mass setting of bugs to
be FIXED. If you believe that I've closed a bug in error, please re-open it.
Thanks.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 6•25 years ago
|
||
Mass changing Security:Crypto to PSM
Component: Security: Crypto → Client Library
Product: Browser → PSM
Version: other → 2.1
Comment 7•25 years ago
|
||
Mass changing Security:Crypto to PSM
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•