New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 628518 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

Enable checksum validation for UnionPay card numbers

Reported by metaf...@yandex-team.ru, Jul 15 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Steps to reproduce the problem:
In  crbug.com/242274  validation of UnionPay credit cards was disabled.

The fix was based on Wikipedia article with unreliable source. Here is an edit https://goo.gl/aBmedp changed "unknown" to "no validation" by unregistered user w/o any reference. After a while that was corrected https://goo.gl/phVfrJ
I have checked up Amazon.com payment cards form and it accepts only UnionPay cards that pass Luhn checksum.

I am going to follow this issue with CL.

What is the expected behavior?

What went wrong?
UnionPay card numbers should be treated as any other.

Did this work before? N/A 

Chrome version: <Copy from: 'about:version'>  Channel: stable
OS Version: 
Flash Version:
 
Labels: Te-NeedsFurtherTriage
Components: UI>Browser>Autofill
Components: UI>Browser>Autofill>Payments
Labels: -OS-Linux -Type-Bug -Te-NeedsFurtherTriage OS-All Type-Feature
Owner: rouslan@chromium.org
Status: Available (was: Unconfirmed)
Assigning to myself to keep track of this. Feel free to take it on yourself. If you do that, please assign to yourself and mark "Started."

Comment 4 Deleted

Yes, I will upload CL. Not sure how to edit the issue though :)
Looks like you don't have bug editing privileges yet. No problem. I can help shepherd your patch.

Comment 7 by ma...@chromium.org, Jul 21 2016

Cc: zkoch@chromium.org
Thanks for the CL. Is there an authoritative source on this? Wiki+Amazon as a combination are pretty good, but just curious.
> Is there an authoritative source on this?
I have tried to find any official reference without success. Have just sent an request through 'contact' of UnionPay website. Hope they will answer soon enough.
I wrote emails to a couple of official UnionPay emails a week ago but got not response yet.
But I have managed to find some evidence of "real life" card numbers: there is a card exchange site colnect.com where
(along with coins and stamps) user exchange credit cards (I hope expired ones ^_^). Here is first four in

http://colnect.com/en/bank_cards/list/issuer/40-Union_Pay

where digits are not blurred, starts with 62 skipping ones with identical background (maybe biased) or ending with 000000000 (sample cards)

http://colnect.com/en/bank_cards/bank_card/8679-UnionPay-Tiangin_Rural_Cooperative_Bank-China_Peoples_Republic
6223290302015504906
http://colnect.com/en/bank_cards/bank_card/5996-Qian_Shan_Card-Anshan_City_Commercial_Bank-China_Peoples_Republic
6224130661897035
http://colnect.com/en/bank_cards/bank_card/947-Beijing_Olympic_6-Bank_Of_China-China_Peoples_Republic
6013821600603048670
http://colnect.com/en/bank_cards/bank_card/8466-BC_Debit_Card-Bank_Of_Communications-China_Peoples_Republic
6222600790001453087
http://colnect.com/en/bank_cards/bank_card/18056-Ebank-China_Everbright_Bank-China_Peoples_Republic
6200852100697886 (still readable)
http://colnect.com/en/bank_cards/bank_card/8204-ICBC_Intra-bank_Card-Industrial_And_Commercial_Bank_Of_China-China_Peoples_Republic
6222370103168379

I must be incredibly lucky (1/1000000) to get 6 random numbers that are not supposed to pass checksum but do pass :)

With all above and current version of Wikipedia page I feel pretty confident about this change.
* not "four" but "six" (I found two more to increase confidence)
Should I post that to CL? There is no activity there.
Cc: rouslan@chromium.org
Owner: ma...@chromium.org
Assigning to mathp@, because he's reviewing the CL.
CL merged. Thank you!
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 2 2016

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

commit c2e6e3149e3abd4de5b9969c2ece3caa019c3540
Author: metaflow <metaflow@yandex-team.ru>
Date: Tue Aug 02 02:26:47 2016

UnionPay credit card numbers now validated by Luhn checksum.

In  crbug.com/242274  validation of UnionPay credit cards was disabled.

The fix was based on Wikipedia article with unreliable source. Here is an edit https://goo.gl/aBmedp changed "unknown" to "no validation" by unregistered user w/o any reference. After a while that was corrected https://goo.gl/phVfrJ
I have checked up Amazon.com payment cards form and it accepts only UnionPay cards that pass Luhn checksum.

BUG= 628518 
R=mathp@chromium.org

Review-Url: https://codereview.chromium.org/2170773002
Cr-Commit-Position: refs/heads/master@{#409122}

[modify] https://crrev.com/c2e6e3149e3abd4de5b9969c2ece3caa019c3540/components/autofill/core/browser/credit_card_unittest.cc
[modify] https://crrev.com/c2e6e3149e3abd4de5b9969c2ece3caa019c3540/components/autofill/core/browser/validation.cc
[modify] https://crrev.com/c2e6e3149e3abd4de5b9969c2ece3caa019c3540/components/autofill/core/browser/validation_unittest.cc

Comment 15 by ma...@chromium.org, Oct 18 2016

Status: Fixed (was: Available)
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment