Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brave Ads estimated redemption value should return 0 for invalid catalog issuers name #9776

Closed
tmancey opened this issue May 14, 2020 · 2 comments

Comments

@tmancey
Copy link
Contributor

tmancey commented May 14, 2020

Description

Brave Ads estimated redemption value should return 0 for invalid catalog issuers name. This is an edge case as the server would need to send the wrong values.

Steps to Reproduce

  1. Download catalog for the environment you are using, i.e. staging, production etc.
  2. Map this file in Charles Proxy
  3. Edit the catalog and clear out the contents of the catalog issuer names or add invalid values such as abc
  4. View an ad

Actual result:

Depending on the value in the name, the token redemption value may not be 0.0 or a crash may occur

Expected result:

Token redemption value should be 0.0

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Yes
  • Can you reproduce this issue with the dev channel? Yes
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? N/A

Miscellaneous Information:

@tmancey tmancey added good first issue QA/Yes priority/P3 The next thing for us to work on. It'll ride the trains. release-notes/exclude labels May 31, 2020
@tmancey
Copy link
Contributor Author

tmancey commented Jul 29, 2020

Closing issue as resolved by #9870

@tmancey tmancey closed this as completed Jul 29, 2020
@tmancey tmancey added QA/No QA/Yes priority/P3 The next thing for us to work on. It'll ride the trains. and removed QA/Yes good first issue priority/P3 The next thing for us to work on. It'll ride the trains. QA/No labels Jul 29, 2020
@tmancey tmancey added this to the 1.14.x - Nightly milestone Jul 29, 2020
@tmancey tmancey added closed/duplicate Issue has already been reported OS/Desktop and removed closed/duplicate Issue has already been reported labels Aug 11, 2020
@LaurenWags
Copy link
Member

LaurenWags commented Sep 9, 2020

Verified passed with

Brave | 1.14.79 Chromium: 85.0.4183.83 (Official Build) dev (64-bit)
-- | --
Revision | 94abc2237ae0c9a4cb5f035431c8adfb94324633-refs/branch-heads/4183@{#1658}
OS | macOS Version 10.14.6 (Build 18G3020)
  • Verified STR from description

  • After mapping the catalog in Charles, this displayed in the logs:

[1934:775:0909/131604.562857:VERBOSE1:confirmations.cc(50)] SetCatalogIssuers:
[1934:775:0909/131604.562900:VERBOSE1:confirmations.cc(51)]   Public key: crDVI1R6xHQZ4D9cQu4muVM5MaaM1QcOT4It8Y/CYlw=
[1934:775:0909/131604.562942:VERBOSE1:confirmations.cc(52)]   Issuers:
[1934:775:0909/131604.562985:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563028:VERBOSE1:confirmations.cc(56)]     Public key: JiwFR2EU/Adf1lgox+xqOVPuc6a/rxdy/LguFG5eaXg=
[1934:775:0909/131604.563087:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563161:VERBOSE1:confirmations.cc(56)]     Public key: CrQLMWmUuYog6Q93nScS8Lo1HHSex8WM2Qxij7qhjkQ=
[1934:775:0909/131604.563212:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563257:VERBOSE1:confirmations.cc(56)]     Public key: iJcG3AkH1sgl+5YCZuo+4Q/7aeBOnYyntkIUXeMbDCs=
[1934:775:0909/131604.563299:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563343:VERBOSE1:confirmations.cc(56)]     Public key: VihGXGoiQ5Fjxe4SrskIVMcmERa1LoAgvhFxxfLmNEI=
[1934:775:0909/131604.563388:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563427:VERBOSE1:confirmations.cc(56)]     Public key: 6DBiZUS47m8eb5ohI2MiRaERLzS4DQgMp4nxPLKAenA=
[1934:775:0909/131604.563466:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563503:VERBOSE1:confirmations.cc(56)]     Public key: YOIEGq4joK7rtkWdcNdNNGT5xlU/KIrri4AX19qwZW4=
[1934:775:0909/131604.563541:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563578:VERBOSE1:confirmations.cc(56)]     Public key: lLO5tErGoTK0askrALab6pKGAnBHqELSyw/evqZRwH8=
[1934:775:0909/131604.563615:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563652:VERBOSE1:confirmations.cc(56)]     Public key: bPE1QE65mkIgytffeu7STOfly+x10BXCGuk5pVlOHQU=
[1934:775:0909/131604.563689:VERBOSE1:confirmations.cc(55)]     Name: ABC
[1934:775:0909/131604.563727:VERBOSE1:confirmations.cc(56)]     Public key: aDD4SJmIj2xwdA6D00K1dopTg90oOFpwd2iiK8bqqlQ=
  • Upon viewing an ad, this showed in the logs:
[1934:775:0909/131643.175929:VERBOSE1:catalog_issuers_info.cc(137)] Failed to estimate redemption value due to invalid catalog issuer name
[1934:775:0909/131643.175986:VERBOSE1:redeem_unblinded_token.cc(349)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 1 unblinded payment tokens
[1934:775:0909/131643.176467:VERBOSE1:ads_impl.cc(1427)] Successfully redeemed unblinded token with confirmation id 268c71d8-e631-4f17-814b-d3d56455caf6, creative instance id cd20cc5e-c125-44d0-82a3-75a6fee67704 and view

Verification passed on


Brave | 1.14.80 Chromium: 85.0.4183.102 (Official Build) (64-bit)
-- | --
Revision | ffe848af6a5df4fa127e2929331116b7f9f1cb30-refs/branch-heads/4183@{#1770}
OS | Windows 10 OS Version 1903 (Build 18362.1016)


  • Verified STR from description

  • After mapping the catalog in Charles, this displayed in the logs:

[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(50)] SetCatalogIssuers:
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(51)]   Public key: crDVI1R6xHQZ4D9cQu4muVM5MaaM1QcOT4It8Y/CYlw=
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(52)]   Issuers:
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(56)]     Public key: JiwFR2EU/Adf1lgox+xqOVPuc6a/rxdy/LguFG5eaXg=
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(56)]     Public key: CrQLMWmUuYog6Q93nScS8Lo1HHSex8WM2Qxij7qhjkQ=
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(56)]     Public key: iJcG3AkH1sgl+5YCZuo+4Q/7aeBOnYyntkIUXeMbDCs=
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(56)]     Public key: VihGXGoiQ5Fjxe4SrskIVMcmERa1LoAgvhFxxfLmNEI=
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(56)]     Public key: 6DBiZUS47m8eb5ohI2MiRaERLzS4DQgMp4nxPLKAenA=
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(56)]     Public key: YOIEGq4joK7rtkWdcNdNNGT5xlU/KIrri4AX19qwZW4=
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(56)]     Public key: lLO5tErGoTK0askrALab6pKGAnBHqELSyw/evqZRwH8=
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.267:VERBOSE1:confirmations.cc(56)]     Public key: bPE1QE65mkIgytffeu7STOfly+x10BXCGuk5pVlOHQU=
[18404:7436:0911/192136.268:VERBOSE1:confirmations.cc(55)]     Name: abc
[18404:7436:0911/192136.268:VERBOSE1:confirmations.cc(56)]     Public key: aDD4SJmIj2xwdA6D00K1dopTg90oOFpwd2iiK8bqqlQ=
  • Upon viewing an ad, this showed in the logs:
[18404:7436:0911/192234.690:VERBOSE1:catalog_issuers_info.cc(137)] Failed to estimate redemption value due to invalid catalog issuer name
[18404:7436:0911/192234.691:VERBOSE1:redeem_unblinded_token.cc(349)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 2 unblinded payment tokens
[18404:7436:0911/192234.691:VERBOSE1:ads_impl.cc(1427)] Successfully redeemed unblinded token with confirmation id 725ad6d6-ae19-445b-b618-ff1f26b194da, creative instance id 25326f99-cebe-404a-82c6-c15fa11994e8 and click

Verification passed on

Brave 1.14.81 Chromium: 85.0.4183.102 (Official Build) (64-bit)
Revision ffe848af6a5df4fa127e2929331116b7f9f1cb30-refs/branch-heads/4183@{#1770}
OS Ubuntu 18.04 LTS
  • Verified STR from description

Set issuer name to abc

[6328:6328:0914/223833.475196:VERBOSE1:catalog_issuers_info.cc(137)] Failed to estimate redemption value due to invalid catalog issuer name
[6328:6328:0914/223833.475246:VERBOSE1:redeem_unblinded_token.cc(349)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 1 unblinded payment tokens
[6328:6328:0914/223833.475385:VERBOSE1:ads_impl.cc(1427)] Successfully redeemed unblinded token with confirmation id ef11bfb2-cdf9-44db-bea5-881ca8fb5080, creative instance id d175cdfd-57bf-46c3-9b00-89eed71c6ae5 and view

Set issuer name to empty string


[6861:6861:0914/224704.128374:VERBOSE1:catalog_issuers_info.cc(137)] Failed to estimate redemption value due to invalid catalog issuer name
[6861:6861:0914/224704.128421:VERBOSE1:redeem_unblinded_token.cc(349)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 1 unblinded payment tokens
[6861:6861:0914/224704.128499:VERBOSE1:ads_impl.cc(1427)] Successfully redeemed unblinded token with confirmation id c8b3dfc2-c157-4e9f-86af-04d814fb28f3, creative instance id d175cdfd-57bf-46c3-9b00-89eed71c6ae5 and view

@tmancey tmancey added this to Ads Jun 10, 2024
@tmancey tmancey moved this to Done in Ads Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants