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

Affiliate ID being suggested in auto-complete for specific sites #10129

Closed
SaschaWebDev opened this issue Jun 6, 2020 · 12 comments
Closed

Affiliate ID being suggested in auto-complete for specific sites #10129

SaschaWebDev opened this issue Jun 6, 2020 · 12 comments
Labels
closed/duplicate Issue has already been reported

Comments

@SaschaWebDev
Copy link

Please change brave-core\components\omnibox\browser\suggested_sites_provider_data.cc
into the following to stop making gullible people pay into the pockets of individual bad actors on this project.

/* Copyright (c) 2020 The Brave Authors. All rights reserved.

  • This Source Code Form is subject to the terms of the Mozilla Public
  • License, v. 2.0. If a copy of the MPL was not distributed with this file,
  • You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "brave/components/omnibox/browser/suggested_sites_provider.h"

#include "base/strings/utf_string_conversions.h"

const std::vector&
SuggestedSitesProvider::GetSuggestedSites() {
static const std::vector suggested_sites = {
{
SuggestedSitesMatch(
"binance.com",
GURL("https://www.binance.com?ref=AffiliateEaterID"),
GURL("https://www.binance.com"),
base::ASCIIToUTF16("binance.com?ref=AffiliateEaterID"),
true)
}, {
SuggestedSitesMatch(
"bitcoin",
GURL("https://www.binance.com/en/buy-sell-crypto"
"?fiat=USD&crypto=BTC&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.com/en/buy-sell-crypto?crypto=BTC"),
base::ASCIIToUTF16("binance.com/en/buy-sell-crypto?crypto=BTC&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"btc",
GURL("https://www.binance.com/en/buy-sell-crypto"
"?fiat=USD&crypto=BTC&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.com/en/buy-sell-crypto?crypto=BTC"),
base::ASCIIToUTF16("binance.com/en/buy-sell-crypto?crypto=BTC&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"ethereum",
GURL("https://www.binance.com/en/buy-sell-crypto"
"?fiat=USD&crypto=ETH&ref=AffiliateEaterID6&utm_source=brave"),
GURL("https://www.binance.com/en/buy-sell-crypto?crypto=ETH"),
base::ASCIIToUTF16("binance.com/en/buy-sell-crypto?crypto=ETH&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"eth",
GURL("https://www.binance.com/en/buy-sell-crypto"
"?fiat=USD&crypto=ETH&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.com/en/buy-sell-crypto?crypto=ETH"),
base::ASCIIToUTF16("binance.com/en/buy-sell-crypto?crypto=ETH&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"litecoin",
GURL("https://www.binance.com/en/buy-sell-crypto"
"?fiat=USD&crypto=LTC&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.com/en/buy-sell-crypto?crypto=LTC"),
base::ASCIIToUTF16("binance.com/en/buy-sell-crypto?crypto=LTC&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"ltc",
GURL("https://www.binance.com/en/buy-sell-crypto"
"?fiat=USD&crypto=LTC&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.com/en/buy-sell-crypto?crypto=LTC"),
base::ASCIIToUTF16("binance.com/en/buy-sell-crypto?crypto=LTC&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"bnb",
GURL("https://www.binance.com/en/buy-sell-crypto"
"?fiat=USD&crypto=BNB&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.com/en/buy-sell-crypto?crypto=BNB"),
base::ASCIIToUTF16("binance.com/en/buy-sell-crypto?crypto=BNB&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"binance.us",
GURL("https://www.binance.us?ref=AffiliateEaterID"),
GURL("https://www.binance.us"),
base::ASCIIToUTF16("binance.us?ref=AffiliateEaterID"),
true)
}, {
SuggestedSitesMatch(
"bitcoin",
GURL("https://www.binance.us/en/buy-sell-crypto"
"?fiat=USD&crypto=BTC&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.us/en/buy-sell-crypto?crypto=BTC"),
base::ASCIIToUTF16("binance.us/en/buy-sell-crypto?crypto=BTC&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"btc",
GURL("https://www.binance.us/en/buy-sell-crypto"
"?fiat=USD&crypto=BTC&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.us/en/buy-sell-crypto?crypto=BTC"),
base::ASCIIToUTF16("binance.us/en/buy-sell-crypto?crypto=BTC&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"ethereum",
GURL("https://www.binance.us/en/buy-sell-crypto"
"?fiat=USD&crypto=ETH&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.us/en/buy-sell-crypto?crypto=ETH"),
base::ASCIIToUTF16("binance.us/en/buy-sell-crypto?crypto=ETH&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"eth",
GURL("https://www.binance.us/en/buy-sell-crypto"
"?fiat=USD&crypto=ETH&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.us/en/buy-sell-crypto?crypto=ETH"),
base::ASCIIToUTF16("binance.us/en/buy-sell-crypto?crypto=ETH&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"bnb",
GURL("https://www.binance.us/en/buy-sell-crypto"
"?fiat=USD&crypto=BNB&ref=AffiliateEaterID&utm_source=brave"),
GURL("https://www.binance.us/en/buy-sell-crypto?crypto=BNB"),
base::ASCIIToUTF16("binance.us/en/buy-sell-crypto?crypto=BNB&ref=AffiliateEaterID"), // NOLINT
false)
}, {
SuggestedSitesMatch(
"coinbase.com/join",
GURL("https://www.coinbase.com/join/AffiliateEaterID"),
GURL("https://www.coinbase.com/join"),
base::ASCIIToUTF16("coinbase.com/join/AffiliateEaterID"),
true)
}, {
SuggestedSitesMatch(
"ledger.com/pages/ledger-nano-x",
GURL("https://shop.ledger.com/pages/ledger-nano-x?r=AffiliateEaterID"),
GURL("https://shop.ledger.com/pages/ledger-nano-x"),
base::ASCIIToUTF16("shop.ledger.com/pages/ledger-nano-x?r=AffiliateEaterID"),
true)
}, {
SuggestedSitesMatch(
"trezor.io/product/trezor-one-metallic",
GURL("https://shop.trezor.io/product/trezor-one-metallic"
"?offer_id=24&aff_id=AffiliateEaterID"),
GURL("https://shop.trezor.io/product/trezor-one-metallic"),
base::ASCIIToUTF16("shop.trezor.io/product/trezor-one-metallic"
"?offer_id=24&aff_id=AffiliateEaterID"),
true)
},
};

return suggested_sites;
}

@irissoftworks
Copy link

irissoftworks commented Jun 6, 2020

Tbh I see nothing wrong with these suggestions personally.

Having said that, why not add a "suggested" or "promoted" label for the suggested ref links and allow users to decide if they want to support brave in this fashion.

Also would be interesting to see some of the value gained from this to reflect on BAT. If that is that case I think brave users can only benefit from this and it's only fair.

@joshxyzhimself
Copy link

@SaschaWebDev
Copy link
Author

SaschaWebDev commented Jun 7, 2020

Tbh I see nothing wrong with these suggestions personally.

Having said that, why not add a "suggested" or "promoted" label for the suggested ref links and allow users to decide if they want to support brave in this fashion.

Also would be interesting to see some of the value gained from this to reflect on BAT. If that is that case I think brave users can only benefit from this and it's only fair.

Brendan Eich himself sees very much wrong with them, said multiple times he takes all the blame and the project is going to get rid of them.

https://twitter.com/BrendanEich/status/1269324204844806145?s=20

@bsclifton
Copy link
Member

bsclifton commented Jun 7, 2020

Change is now disabled in source via:
brave/brave-core#5761

For those reading, this functionality is behind a flag which you can disable via brave://settings/appearance:
image

With the fix linked above, the Show Brave suggested sites in autocomplete suggestions setting will be defaulted to false. Existing users that haven't modified the setting will have it turned off with our next release (planned for Thurs June 11). We're also considering a hotfix that would be released before that

I've started a Nightly build and we'll also have this fix uplifted to Beta soon (with a build following the merge there)

@irissoftworks
Copy link

irissoftworks commented Jun 7, 2020

Tbh I see nothing wrong with these suggestions personally.
Having said that, why not add a "suggested" or "promoted" label for the suggested ref links and allow users to decide if they want to support brave in this fashion.
Also would be interesting to see some of the value gained from this to reflect on BAT. If that is that case I think brave users can only benefit from this and it's only fair.

Brendan Eich himself sees very much wrong with them, said multiple times he takes all the blame and the project is going to get rid of them.

https://twitter.com/BrendanEich/status/1269324204844806145?s=20

No, he didn't say it was wrong. He and other brave employees said they were going to remove it and it was a [PR] mistake. The feature itself is innocuous and not really hurting anyone.

In other words it was removed because cry babies, because of general outcry of offended ladies and hate from bitcoin maximalists [and I'm glad I can point the unpopular version out to you because I'm not involved in the project in any way].

@PrincessAkira
Copy link

I would still like to have these refs because i like the browser.
Is there a way for me, to opt-in to them?

@bsclifton
Copy link
Member

I would still like to have these refs because i like the browser.
Is there a way for me, to opt-in to them?

Yes - when a new build comes out, you can toggle the Show Brave suggested sites in autocomplete suggestions flag on the Settings page, under Appearance

@bbondy
Copy link
Member

bbondy commented Jun 8, 2020

@bsclifton bsclifton changed the title Fix for the affiliate ID fuckup Affiliate ID being suggested in auto-complete for specific sites Jun 8, 2020
@r3pek
Copy link

r3pek commented Jun 8, 2020

@bsclifton is there a brave/chrome policy that can be changed to manage this centrally?

@bsclifton
Copy link
Member

bsclifton commented Jun 8, 2020

@r3pek no - there isn't one yet. But we do have an issue to add Brave specific settings captured here:
#9458

So far, enabling/disabling of Tor is the only Brave-specific feature behind a group policy

@bsclifton
Copy link
Member

The fix for this rolled out today on Release channel (1.9.80) and we're deploying Android soon too.

We've put together a post about this which you all can read here:
https://brave.com/referral-codes-in-suggested-sites/

@bsclifton bsclifton added the closed/duplicate Issue has already been reported label Jun 9, 2020
@blackcrack
Copy link

blackcrack commented Jun 9, 2020

@bsclifton 👍 have send news to winfuture.de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed/duplicate Issue has already been reported
Projects
None yet
Development

No branches or pull requests

9 participants