Skip to content

Commit

Permalink
Bug 1435155 - Redact the shipping address as it is visible before the…
Browse files Browse the repository at this point in the history
… promise from PaymentRequest.show() resolves successfully. r=baku

Spec PR: w3c/payment-request#654

MozReview-Commit-ID: 2AiKI7htRhk

UltraBlame original commit: 8a29a154e88dc58d0ffde543a2159d70638ce53c
  • Loading branch information
marco-c committed Oct 2, 2019
1 parent 6a893cb commit 754d85f
Show file tree
Hide file tree
Showing 4 changed files with 587 additions and 4 deletions.
35 changes: 34 additions & 1 deletion dom/payments/PaymentRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3791,7 +3791,7 @@ mInternalId
mId
aMethodName
mShippingOption
mShippingAddress
mFullShippingAddress
aDetails
aPayerName
aPayerEmail
Expand Down Expand Up @@ -4533,6 +4533,12 @@ nsAString
aPhone
)
{
nsTArray
<
nsString
>
emptyArray
;
mShippingAddress
=
new
Expand All @@ -4542,6 +4548,33 @@ GetOwner
(
)
aCountry
emptyArray
aRegion
aCity
aDependentLocality
aPostalCode
aSortingCode
aLanguageCode
EmptyString
(
)
EmptyString
(
)
EmptyString
(
)
)
;
mFullShippingAddress
=
new
PaymentAddress
(
GetOwner
(
)
aCountry
aAddressLine
aRegion
aCity
Expand Down
6 changes: 6 additions & 0 deletions dom/payments/PaymentRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,12 @@ PaymentAddress
>
mShippingAddress
;
RefPtr
<
PaymentAddress
>
mFullShippingAddress
;
nsString
mShippingOption
;
Expand Down
4 changes: 4 additions & 0 deletions dom/payments/test/ShowPaymentChromeScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ San
Bruno
"
"
Test
locality
"
"
94066
Expand All @@ -195,6 +197,8 @@ Bruno
en
"
"
Testing
Org
"
"
Bill
Expand Down
Loading

0 comments on commit 754d85f

Please sign in to comment.