New issue
Advanced search Search tips

Issue 843227 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Wrong credit card obfuscation in RTL strings

Project Member Reported by ftirelo@chromium.org, May 15 2018

Issue description

Chrome Version: M68
OS: all OSes

What steps will reproduce the problem?
(1) Create a credit card for in which the bank name's language is RTL
(2) Show that card as a CC suggestion

What is the expected result?

Credit card should be obfuscated as '****1235 <bank name>', since numbers are LTR even for RTL languages (checked Farsi, Hebrew, and Arabic).

What happens instead?

We present '1235**** <bank name>', which doesn't make sense.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d28bc3ae15b980080a9d91b5b0af7488297b1e4a

commit d28bc3ae15b980080a9d91b5b0af7488297b1e4a
Author: Fabio Tirelo <ftirelo@chromium.org>
Date: Thu May 17 23:02:25 2018

RTL-aware credit card number obfuscation

The fix consists of adding annotations to an obfuscated number
with form '****1235' to always be rendered as LTR. This is done
by wrapping it with an LRE-PDF pair (Left-to-Right Embedding,
Pop Directional Formatting). This way, that portion of the string
will always be rendered correctly, regardless of context.

Screenshots: https://drive.google.com/open?id=1j4Prkw-BwuDvhobWWFYzGgNaF1o_U-6yIkAmz2K2bUQ

Bug:  843227 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I0476bd4b6f40148f9d8e46b53a70e37d09c1e720
Reviewed-on: https://chromium-review.googlesource.com/1059585
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559719}
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppAndCardsTest.java
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppsSortingTest.java
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/components/autofill/core/browser/autofill_manager_unittest.cc
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/components/autofill/core/browser/autofill_test_utils.cc
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/components/autofill/core/browser/autofill_test_utils.h
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/components/autofill/core/browser/credit_card.cc
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/components/autofill/core/browser/credit_card.h
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/components/autofill/core/browser/credit_card_unittest.cc
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/components/autofill/core/browser/personal_data_manager_unittest.cc
[modify] https://crrev.com/d28bc3ae15b980080a9d91b5b0af7488297b1e4a/ios/chrome/browser/ui/payments/payment_request_mediator_unittest.mm

Status: Fixed (was: Assigned)

Sign in to add a comment