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

Do not insert promotion if public key is empty #9660

Closed
NejcZdovc opened this issue May 6, 2020 · 1 comment · Fixed by brave/brave-core#5485
Closed

Do not insert promotion if public key is empty #9660

NejcZdovc opened this issue May 6, 2020 · 1 comment · Fixed by brave/brave-core#5485

Comments

@NejcZdovc
Copy link
Contributor

Right now when we fetch promotions from the server we just insert them and only check if they are active. We should also check if public key is valid (meaning not an empty list) before inserting it.

@srirambv
Copy link
Contributor

srirambv commented Jun 2, 2020

Verification passed on

Brave 1.10.81 Chromium: 81.0.4044.138 (Official Build) beta (64-bit)
Revision 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{# 999}
OS Windows 10 OS Version 1809 (Build 17763.379)

Screenshot 2020-06-02 at 11 52 32 a m

Verification passed on

Brave 1.10.80 Chromium: 81.0.4044.138 (Official Build) dev (64-bit)
Revision 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#5485

  • Verified promotion showed error when trying to claim
    image
  • Verified the promotion is cleared
  • Verified status of the promotion did not change

Verification PASSED on macOS 10.15.5 x64 using the following build:

Brave | 1.10.86 Chromium: 83.0.4103.61 (Official Build) (64-bit)
-- | --
Revision | 94f915a8d7c408b09cc7352161ad592299f384d2-refs/branch-heads/4103@{#561}
OS | macOS Version 10.15.5 (Build 19F101)
  • Verified the case outlined via Promotion guards brave-core#5485 without issues
  • ensured that the promotion was cleared once OK was clicked on the Oops, something is wrong. Please try again later. error.
  • ensured that the status not any unexpected values where changed under the promotion table via publisher_info_db

Screen Shot 2020-06-08 at 3 33 48 PM

Screen Shot 2020-06-08 at 3 34 08 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants