non-ascii characters not recognized by master password dialog

RESOLVED FIXED in mozilla1.8.1

Status

RESOLVED FIXED
15 years ago
3 years ago

People

(Reporter: walter.haidinger, Assigned: kaie)

Tracking

({fixed1.8.1, intl})

Trunk
mozilla1.8.1
x86
Windows XP
fixed1.8.1, intl
Bug Flags:
blocking1.8.1 +
blocking1.8.0.1 -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
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?

Comment 1

15 years ago
*** 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
(Assignee)

Comment 4

14 years ago
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
(Assignee)

Comment 5

14 years ago
Cool, my suggestion makes it indeed work, using a 123§123 password.

Will attach a patch once I get my CVS access back...
(Assignee)

Comment 6

14 years ago
Posted patch patch v1Splinter Review
(Assignee)

Comment 7

14 years ago
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
(Assignee)

Comment 9

14 years ago
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.
(Assignee)

Updated

14 years ago
Attachment #174157 - Flags: superreview?(brendan)

Updated

14 years ago
Component: Security: UI → Security: UI
Product: PSM → Core

Updated

14 years ago
Summary: non-ascii characters not recgnized by master password dialog → non-ascii characters not recognized by master password dialog
Version: Other Branch → Trunk

Comment 10

14 years ago
*** Bug 306393 has been marked as a duplicate of this bug. ***

Updated

14 years ago
Blocks: 304698

Comment 11

14 years ago
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.
(Assignee)

Updated

14 years ago
Attachment #174157 - Flags: superreview?(brendan) → superreview?(shaver)
(Assignee)

Comment 12

14 years ago
*** 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+
(Assignee)

Comment 14

14 years ago
fixed on trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Comment 15

14 years ago
*** Bug 316977 has been marked as a duplicate of this bug. ***

Comment 16

14 years ago
*** 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?

Comment 18

14 years ago
AFAIK 1.8.0.1 is only for security fixes, but we should try it. :-)
Flags: blocking1.8.0.1?
Keywords: intl

Comment 19

13 years ago
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-

Updated

13 years ago
Attachment #174157 - Flags: approval1.8.0.1? → approval1.8.0.1-
(Assignee)

Comment 20

13 years ago
Checked in to MOZILLA_1_8_BRANCH

Should I set some fixed1.8.x keyword?

Updated

13 years ago
Keywords: fixed1.8.1
Target Milestone: --- → mozilla1.8.1

Comment 21

13 years ago
*** 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.