add localization notes for length-limited PKCS#11 strings in pipnss.properties

RESOLVED FIXED in Firefox 59

Status

()

Core
Security: PSM
P5
normal
RESOLVED FIXED
12 years ago
9 days ago

People

(Reporter: Giacomo Magnini, Assigned: flod)

Tracking

Trunk
mozilla59
x86
Windows XP
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox59 fixed)

Details

(Whiteboard: [kerh-coa][psm-backlog])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.8) Gecko/20051206 SeaMonkey/1.0b
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.8) Gecko/20051206 SeaMonkey/1.0b

When using a localized version of SM, the password prompt for the security device is being cut at the end. The CertPassPrompt string is ok (that is, is shown fully), but the substitution for the included %S seems to fail for some reason (that is, the last char is being cut).
As an example, if I try to export a personal certificate, the dialog shows the problem (under it-IT): the PrivateTokenDescription entity (in Italian: "Dispositivo di sicurezza") which is used in the dialog shows up as "Dispositivo di sicurezz".

Reproducible: Always




Under guidance from dveditz over IRC, I've tried adding "xxx" at the end of PvtTknDesc, but the outcome doesn't change.
If I change the string to "Dispositivo xxx", it shows up fully in the dialog.
I have tried also adding a space before the fullstop in CertPassPrompt, but it didn't help with the failing substitution (but showed up correctly in the dialog after the cutten string).
Also, dveditz can't see any string limit (nor it is reported as a LOCALIZATION NOTE in the pipnss.properties file) anywhere in the code, which was my first wild guess at first.
I also checked the translated file with a hex editor to see if any extraneous char was added, and saw none.
I've still one or two tests I'd like to do, and report back the outcome.
(Reporter)

Comment 1

12 years ago
More findings, on the left the string for PrivateTokenDescription, on the right the outcome in the dialog:
"Dispositivo di abcdefghijklmnopqrstuvwxyz" -> "Dispositivo di abcdefghijklmnopq"
"Dispositivo abcdefghijklmnopqrstuvwxyz"    -> "Dispositivo abcdefghijklmnopqrst"
"Dispositivo sicurezza"                     -> "Dispositivo sicurezza"

This makes me think there is actually a real limit on the substitution string of around 32 chars. If you agree, then the limit should be removed, or, if it is a security concern, a LOCALIZATION NOTE should be added to the relevant entries (probably more than only PrivateTokenDescription...) in pipnss.properties and maybe even pippki.properties.

Before someone asks (and I foget), CertPassPrompt has got %S (capital) also in the translated version.
(Reporter)

Comment 2

12 years ago
Need to correct my comment 0: it's not "Dispositivo di sicurezza", but it's "Dispositivo di sicurezza software", and it gets truncated as "Dispositivo di sicurezza softwar" (missing last "e").
More evidence of a 32 chars limit for the string...
see also bug 317630
Yeah, I bet you're right
Status: UNCONFIRMED → NEW
Depends on: 317630
Ever confirmed: true
Keywords: intl, l12y

Updated

12 years ago
Whiteboard: [kerh-coa]

Updated

12 years ago
Priority: -- → P3
Target Milestone: --- → Future

Comment 5

11 years ago
See bug 90956 comment 21 why some of the strings are truncated at 32 bytes and others at 64 bytes. That's defined in PKCS #11, which is an industry standard API.
http://en.wikipedia.org/wiki/PKCS

That bug also added the following comment to pipnss.properties:
# the following strings have special requirements:
# they must fit in a 32 or 64 byte buffer after being translated
# to UTF8.  Note to translator. It's not easy for you to figure
# whether the escaped unicode string you produce will fit in 
# the space allocated.
http://lxr.mozilla.org/seamonkey/source/security/manager/locales/en-US/chrome/pipnss/pipnss.properties#44
(Reporter)

Comment 6

11 years ago
Can we mark this bug as WONTFIX/INVALID?

Comment 7

11 years ago
Actually, it looks like we should revisit our localizations and check which are broken, and get bugs on individual locales filed.

I don't have time to do this this week, and my head is going to drop it by then, probably, thus adding a helpwanted keyword.
Keywords: intl, l12y → helpwanted
(Reporter)

Comment 8

11 years ago
Please use the standard notation for localization warnings:
LOCALIZAION NOTE (<entityname>): <explanation>
This will help a lot with automated tools, thanks!

Comment 9

11 years ago
In the Italian branch 1.8 (for Firefox and Thunderbird 2) the string is:

Disp. di sicurezza software
http://lxr.mozilla.org/l10n-mozilla1.8/source/it/security/manager/chrome/pipnss/pipnss.properties#47

so it complies with the 32 characters limit.
QA Contact: ui

Updated

7 years ago
Blocks: 629034

Comment 10

5 years ago
reassign bug owner.
mass-update-kaie-20120918
Assignee: kaie → nobody
See comment 8.
Component: Security: UI → Security: PSM
Priority: P3 → P5
Summary: Password prompt truncates security device translation → add localization notes for length-limited PKCS#11 strings in pipnss.properties
Whiteboard: [kerh-coa] → [kerh-coa][psm-backlog]
(Assignee)

Updated

11 days ago
Assignee: nobody → francesco.lodolo
Comment hidden (mozreview-request)

Comment 13

10 days ago
mozreview-review
Comment on attachment 8934231 [details]
Bug 320231 - Update localization notes for length-limited PKCS#11 strings in pipnss.properties

https://reviewboard.mozilla.org/r/205156/#review211390

This is basically OK, but I'd like to have some more machine-readable comments, and I think we can do that without making this much harder to read. For one, can we put the whole sentence in one line, so that we don't line-break it at different places? And put the number and unit at the end? Something like

    # LOCALIZATION NOTE (RootCertModuleName):
    # string limit after conversion to UTF-8: 64 bytes
Attachment #8934231 - Flags: review?(l10n) → review-
Comment hidden (mozreview-request)
(Assignee)

Comment 15

10 days ago
Updated per IRC discussion with something that clearly looks like a directive, and should be easier to parse.

Comment 16

10 days ago
mozreview-review
Comment on attachment 8934231 [details]
Bug 320231 - Update localization notes for length-limited PKCS#11 strings in pipnss.properties

https://reviewboard.mozilla.org/r/205156/#review211434
Attachment #8934231 - Flags: review?(l10n) → review+

Comment 17

9 days ago
Pushed by francesco.lodolo@mozillaitalia.org:
https://hg.mozilla.org/integration/autoland/rev/a74542182b97
Update localization notes for length-limited PKCS#11 strings in pipnss.properties r=Pike

Comment 18

9 days ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a74542182b97
Status: NEW → RESOLVED
Last Resolved: 9 days ago
status-firefox59: --- → fixed
Resolution: --- → FIXED
Keywords: helpwanted
Target Milestone: Future → mozilla59
You need to log in before you can comment on or make changes to this bug.