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

Fix issue with public keys when redeeming tokens #1907

Merged
merged 1 commit into from
Mar 11, 2019
Merged

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Mar 11, 2019

fixes brave/brave-browser#3655

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Verified that all lint errors/warnings are resolved (npm run lint)
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

Confirm that viewed Ads are cashed out on Ads Serve. You can pass the command-line argument --rewards=debug=true to change the redemption period from ~7 days to ~25 minutes, once your ad views have been redeemed @jimmy @michael.mclaughlin are able to confirm the payments were credited to the users rewards

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

payment_credential.SetKey("credential", base::Value(std::move(credential)));

payment_credential.SetKey("publicKey", base::Value(wallet_info.public_key));
payment_credential.SetKey("publicKey", base::Value(token_info.public_key));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to understand if the current behavior (before this patch) is a privacy issue; probably not because at this stage in redemption, the server has to see the wallet public key anyway so it can do the payment?

If the wallet public key were accidentally sent in earlier stages, that would be a privacy problem since it's a persistent identifier.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diracdeltas apologies I did not tag you earlier as got pulled onto another issue. The wallet public key was sent. Should we arrange a call with Jimmy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diracdeltas: @amirsaber is going to fix the database once the fix has gone live

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, I would just like to understand the scope of the bug. If the wallet public key was sent in Step 1 of https://docs.google.com/document/d/1gqe_RISTHu3VxfzpMKds__X73yO3aIgdeB5fBvp8da0/edit#heading=h.2hb43kpd1ag3, then there would be a privacy issue I think. If it was sent in Step 4, there would be no problem.

Copy link
Member

@diracdeltas diracdeltas Mar 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it was sent in Step 1, then all records of those requests which include the wallet address should be deleted. We should also think about what to do for clients which stay on the unfixed version (and thus will keep sending their wallet address for a while).

Copy link
Collaborator Author

@tmancey tmancey Mar 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diracdeltas I can confirm it was sent in step 4. With regards to clients who stay on the unfixed version which we plan to patch before it goes to beta, Amir and Jimmy have a plan in place.

Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

Fix issue with public keys when redeeming tokens
3 participants