Closed Bug 1508936 Opened 10 months ago Closed 8 months ago
Wrong label is shown on Windows login UI when retrieving credit card numbers
[Affected versions]: Nightly 65.0a1 [Affected platforms]: Platforms: Windows 10 x64 and Windows 7 x32 [Preconditions]: - set the pref dom.payments.request.enabled to "true" - set the pref browser.search.region to "US" - make sure to have at least one Shipping Address and saved CC [Steps to reproduce]: 1. Go to "https://rsolomakhin.github.io/pr/single/" and click on "Buy". 2. Select any address and a Payment Method enter the CVV. 3. Click on "Pay". 4. Observe Windows Security window. [Expected result]: Firefox is trying to use stored credit card information. Enter password to allow this. OR Firefox is trying to show credit card information. Enter password to allow this. Messages should be displayed. [Actual result]: Wrong label is shown on Windows login UI when retrieving credit card numbers.
QA Contact: hani.yacoub
Whiteboard: [webpayments] [triage]
There seems to be an encoding issue of some sort. Franziskus, can you take a look at this?
Unfortunately I don't get any prompt message in the scenario described in comment 0. But the screenshot looks like an encoding issue. The API currently takes an ACString , which gets converted to an nsString for Windows. Do we know how this looks on macOS? There we keep using UTF-8. We could the narrow interface on Windows as well.  https://searchfox.org/mozilla-central/rev/8f89901f2d69d9783f946a7458a6d7ee70635a94/security/manager/ssl/nsIOSReauthenticator.idl#40
It works fine on macOS currently. Not sure why you don't see the prompt using the STR if you're on a recent Nightly. Does the following code snippet in the Browser Console reproduce the problem for you on Windows? Make sure devtools.chrome.enabled = true > await Cc["@mozilla.org/security/osreauthenticator;1"].getService(Ci.nsIOSReauthenticator).asyncReauthenticateUser(Cu.import("resource://formautofill/FormAutofillHandler.jsm").reauthPasswordPromptMessage)
Looks like NS_ConvertUTF8toUTF16 isn't doing the right thing (at least not what I thought it was doing). We need to convert the string with mbstowcs to a wide char.
It only worked in the latest nightly, I had to update :|
Assignee: nobody → franziskuskiefer
Status: NEW → ASSIGNED
Priority: P3 → P1
I don't think the problem is that NS_ConvertUTF8toUTF16 does the encoding wrong, I think the problem is that the object it returns is being destructed before the end of the line, as soon as the PromiseFlatString constructor returns; that's what my debugger is showing me, anyway. The PromiseFlatString object gets its lifetime extended by assigning it to a const&, but the NS_ConvertUTF8toUTF16 doesn't get that treatment, so it's just tossed out as a temporary after the expression is done being evaluated. I can make the bug go away by doing something like: const nsString& utf16Prompt = NS_ConvertUTF8toUTF16(aPrompt); const nsString& prompt = PromiseFlatString(utf16Prompt);
Just to make sure Franziskus saw comment 7.
9 months ago
Attachment #9027111 - Attachment description: Bug 1508936 - convert to wide char with mbstowcs for windows re-auth → Bug 1508936 - Fix conversion to wide characters in OSReauthenticator
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/1f5f38b7f143 Fix conversion to wide characters in OSReauthenticator r=keeler,mhowell
8 months ago
You need to log in before you can comment on or make changes to this bug.