Closed
Bug 133754
Opened 23 years ago
Closed 22 years ago
nsWindowWatcher.cpp uses AssignWithConversion
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
mozilla1.2beta
People
(Reporter: Biesinger, Assigned: smontagu)
References
Details
(Keywords: intl, Whiteboard: [browser])
Attachments
(1 file)
(deleted),
patch
|
smontagu
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
AssignWithConversion is used in nsWindowWatcher.cpp; it should, instead, use
NS_ConvertUTF8toUCS2.
Comment 3•22 years ago
|
||
This is causing the "Reset Master Password" functionality to not work in
translated versions which translate the InternalToken string in
pipnss.properties to a string which contains non-ASCII characters. In
mozilla/security/manager/pki/resources/content/pref-masterpass.js,
internal_token.tokenName is passed via window.open to
mozilla/security/manager/pki/resources/content/resetpassword.js. In
resetpassword.js, the tokenName is then passed to findTokenByName. In our
internal testing, we found that the tokenName parameter was being corrupted via
the AssignWithConversion call in nsWindowWatcher::OpenWindowJS. After changing
the usage of AssignWithConversion to NS_ConvertUTF8toUCS2, the problem was fixed.
This problem can be reproduced in the French translated version of Netscape 7.
Severity: normal → major
OS: Linux → All
Hardware: PC → All
Target Milestone: mozilla1.2alpha → mozilla1.2beta
Comment 4•22 years ago
|
||
Comment 5•22 years ago
|
||
How can we be so sure that aName has to be UTF-8
AssignWithConversion is definitely wrong. But I am not sure treat it as UTF8 is
right neither.
We should look at the api. Why we use char* here instead of PRUnichar* for aName?
Comment 6•22 years ago
|
||
reassign this to simon montagu.
Simon. Please work with danm about this issue.
Assignee: danm → smontagu
Comment 7•22 years ago
|
||
cc. rchen
Comment 8•22 years ago
|
||
If you look at the code that calls this function, it shows the UTF8 stuff.
Here is the call from nsGlobalWindow:
http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsGlobalWindow.cpp#4295
name is explicitly set with ToNewUTF8String
The other calls I can find call ww->OpenWindow with "_blank" explicitly as the name
Assignee | ||
Comment 9•22 years ago
|
||
Comment on attachment 101456 [details] [diff] [review]
AssignWithConversion -> NS_ConvertUTF8toUCS2
It would have been nicer to change the API to use a Unicode string rather than
doing a double conversion, but since the interface is frozen, this seems to be
the way to go.
r=smontagu
Attachment #101456 -
Flags: review+
Updated•22 years ago
|
Comment 10•22 years ago
|
||
This is a problem too in the JA 11/05 build. I can not use the Reset Password
button.
Comment 11•22 years ago
|
||
adding nsbeta1+
Comment 12•22 years ago
|
||
Any update on this one?
Attachment #101456 -
Flags: superreview?(alecf)
Comment 13•22 years ago
|
||
Comment on attachment 101456 [details] [diff] [review]
AssignWithConversion -> NS_ConvertUTF8toUCS2
Ok, just make sure this is really UTF8 here! (are you sure it isn't the native
charset?)
Attachment #101456 -
Flags: superreview?(alecf) → superreview+
Assignee | ||
Comment 14•22 years ago
|
||
>just make sure this is really UTF8 here!
See comment 8
Comment 15•22 years ago
|
||
Checked in:
Checking in nsWindowWatcher.cpp;
/cvsroot/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp,v
<-- nsWindowWatcher.cpp
new revision: 1.69; previous revision: 1.68
done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•