Closed Bug 252436 Opened 20 years ago Closed 19 years ago

non-ascii characters not recognized by master password dialog

Categories

(Core Graveyard :: Security: UI, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: walter.haidinger, Assigned: KaiE)

References

Details

(Keywords: fixed1.8.1, intl)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7) Gecko/20040616 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7) Gecko/20040616 If you set a master password having a non-ascii character (I've tested this with the paragraph sign '§', 0xa7 or shift-3 on a German keyboard layout) in the preferences, the password is not recognized in the popup master password dialog. Luckily there is no bug in the preferences "Change master password" dialog, so you can change your master password there and a reset is not required. Reproducible: Always Steps to Reproduce: 1. Goto: Edit->Preferences->Security->Master Password and set your master password to something including a non-ascii character, e.g. 'foo§bar' ('§' should be the paragraph sign, 0xa7, or shift-3 on a German keyboard layout) and restart Mozilla. 2. Go to a page with a saved password to make the master password dialog appear. 3. Enter 'foo§bar' as master password. It isn't recognized and your prompted over and over again. Even worse, Cancel does not work due to bug 237610. Actual Results: The master password popup dialog did not recogzine my correctly entered master password and prompted again and again. Expected Results: accept the correctly entered master password?
*** Bug 198185 has been marked as a duplicate of this bug. ***
*** Bug 258569 has been marked as a duplicate of this bug. ***
*** Bug 277384 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Ever confirmed: true
mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp function PK11PasswordPrompt I guess the culprit is: char* str = ToNewCString(nsDependentString(password)); I suspect it must be changed to char* str = ToNewUTF8String(nsDependentString(password)); I need to get a mozilla build environment so I can try it out, hopefully later today.
Status: NEW → ASSIGNED
Cool, my suggestion makes it indeed work, using a 123§123 password. Will attach a patch once I get my CVS access back...
Attached patch patch v1Splinter Review
Comment on attachment 174157 [details] [diff] [review] patch v1 David, could you please review? And possibly suggest a superreviewer, if superreview is still required? Thanks.
Attachment #174157 - Flags: review?(dbaron)
FYI nsPK11Token::ChangePassword uses NS_ConvertUCS2toUTF8
Yes, but in this special situation we don't just require a temporary string that can be passed on to a NSS function. We need a string that is dynamically allocated and can be freed by a C function from within the caller, so I guess using ToNewUTF8String is appropriate.
Attachment #174157 - Flags: superreview?(brendan)
Product: PSM → Core
Summary: non-ascii characters not recgnized by master password dialog → non-ascii characters not recognized by master password dialog
Version: Other Branch → Trunk
*** Bug 306393 has been marked as a duplicate of this bug. ***
Blocks: 304698
I guess this bug is a dupe of bug 237121 but since this one's got a patch the older one should be marked as a dupe.
Attachment #174157 - Flags: superreview?(brendan) → superreview?(shaver)
*** Bug 237121 has been marked as a duplicate of this bug. ***
Comment on attachment 174157 [details] [diff] [review] patch v1 sr=shaver
Attachment #174157 - Flags: superreview?(shaver) → superreview+
fixed on trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 316977 has been marked as a duplicate of this bug. ***
*** Bug 317506 has been marked as a duplicate of this bug. ***
Comment on attachment 174157 [details] [diff] [review] patch v1 Nominating for 1.8.0.1. The patch is an obviously-correct, zero risk fix for an i18n problem.
Attachment #174157 - Flags: approval1.8.0.1?
AFAIK 1.8.0.1 is only for security fixes, but we should try it. :-)
Flags: blocking1.8.0.1?
Keywords: intl
Approved to land on the 1.8 branch for 1.8.1/FF2 release.
Flags: blocking1.8.1+
Flags: blocking1.8.0.1?
Flags: blocking1.8.0.1-
Attachment #174157 - Flags: approval1.8.0.1? → approval1.8.0.1-
Checked in to MOZILLA_1_8_BRANCH Should I set some fixed1.8.x keyword?
Keywords: fixed1.8.1
Target Milestone: --- → mozilla1.8.1
*** Bug 350152 has been marked as a duplicate of this bug. ***
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: