diff --git a/.github/workflows/lint-scripts/websites-shared-credentials-duplicates.rb b/.github/workflows/lint-scripts/websites-shared-credentials-duplicates.rb index d97ae3264..b02265a9c 100644 --- a/.github/workflows/lint-scripts/websites-shared-credentials-duplicates.rb +++ b/.github/workflows/lint-scripts/websites-shared-credentials-duplicates.rb @@ -1,12 +1,22 @@ require 'json' require 'set' -shared_websites = JSON.parse(File.read('quirks/websites-with-shared-credential-backends.json')) +KEYS = ["from", "to", "shared"] + +shared_credentials = JSON.parse(File.read('quirks/shared-credentials.json')) +shared_credentials_historical = JSON.parse(File.read('quirks/shared-credentials-historical.json')) + +domains = [] +(shared_credentials + shared_credentials_historical).each do |entry| + KEYS.each do |key| + domains += entry[key] if entry[key] + end +end seen_domains = Set.new -shared_websites.flatten.each do |domain| +domains.each do |domain| STDERR.puts "The domain '#{domain}' appears more than once!" if seen_domains.include?(domain) seen_domains << domain end -exit(1) if seen_domains.count != shared_websites.flatten.count \ No newline at end of file +exit(1) if seen_domains.count != domains.count \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3bab5c4d0..242cea0fe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,8 +40,6 @@ jobs: run: ruby .github/workflows/lint-scripts/websites-shared-credentials-sort-order.rb - name: Lint Duplicates run: ruby .github/workflows/lint-scripts/websites-shared-credentials-duplicates.rb - - name: Verify Generated Files - run: ruby tools/convert-shared-credential-to-legacy-format.rb --verify validate-schemas: runs-on: ubuntu-latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a276808f3..b9922049a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,8 +51,6 @@ Each entry in [`quirks/shared-credentials.json`](quirks/shared-credentials.json) When contributing or amending a set of websites sharing a credential backend, you should state why you believe the relevant domains do or do not share a credential backend, with evidence to support your claim. This may involve WHOIS information or content served from the domains themselves. -[`quirks/websites-with-shared-credential-backends.json`](quirks/websites-with-shared-credential-backends.json) contains a lower fidelity version of the data in [`quirks/shared-credentials.json`](quirks/shared-credentials.json) and [`quirks/shared-credentials-historical.json`](quirks/shared-credentials-historical.json). It must be regenerated using [`tools/convert-shared-credential-to-legacy-format.rb`](tools/convert-shared-credential-to-legacy-format.rb) whenever those files are changed. Please do not edit [`quirks/websites-with-shared-credential-backends.json`](quirks/websites-with-shared-credential-backends.json) manually. - ### Contributing a Change Password URL Use the website in question until you find the standalone page for updating the user's password, or a high-level "Account Information" or "Security" page. The closer the URL takes the user to be able to change their password, the better. Before adding a URL, ensure that it works properly both when the user is logged in and when they are not. URLs added to [`quirks/change-password-URLs.json`](quirks/change-password-URLs.json) should have a scheme of https unless the website does not allow changing the password on an https page. diff --git a/quirks/schemas/websites-with-shared-credential-backends-schema.json b/quirks/schemas/websites-with-shared-credential-backends-schema.json deleted file mode 100644 index bc2172f8a..000000000 --- a/quirks/schemas/websites-with-shared-credential-backends-schema.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "array", - "items": { - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - }, - "minItems": 1 - } -} diff --git a/quirks/websites-with-shared-credential-backends.json b/quirks/websites-with-shared-credential-backends.json deleted file mode 100644 index 0a8295b15..000000000 --- a/quirks/websites-with-shared-credential-backends.json +++ /dev/null @@ -1,935 +0,0 @@ -[ - [ - "3docean.net", - "audiojungle.net", - "codecanyon.net", - "envato.com", - "graphicriver.net", - "photodune.net", - "placeit.net", - "themeforest.net", - "tutsplus.com", - "videohive.net" - ], - [ - "aa.com", - "americanairlines.com", - "americanairlines.jp" - ], - [ - "aetna.com", - "banneraetna.myplanportal.com" - ], - [ - "airbnb.com.ar", - "airbnb.com.au", - "airbnb.at", - "airbnb.be", - "airbnb.com.bz", - "airbnb.com.bo", - "airbnb.com.br", - "airbnb.ca", - "airbnb.cl", - "airbnb.com.co", - "airbnb.co.cr", - "airbnb.cz", - "airbnb.dk", - "airbnb.com.ec", - "airbnb.com.sv", - "airbnb.fi", - "airbnb.fr", - "airbnb.de", - "airbnb.gr", - "airbnb.com.gt", - "airbnb.gy", - "airbnb.com.hn", - "airbnb.com.hk", - "airbnb.hu", - "airbnb.is", - "airbnb.co.in", - "airbnb.co.id", - "airbnb.ie", - "airbnb.it", - "airbnb.jp", - "airbnb.com.my", - "airbnb.com.mt", - "airbnb.mx", - "airbnb.nl", - "airbnb.co.nz", - "airbnb.com.ni", - "airbnb.no", - "airbnb.com.pa", - "airbnb.com.py", - "airbnb.com.pe", - "airbnb.pl", - "airbnb.pt", - "airbnb.ru", - "airbnb.com.sg", - "airbnb.co.kr", - "airbnb.es", - "airbnb.se", - "airbnb.ch", - "airbnb.com.tw", - "airbnb.com.tr", - "airbnb.co.uk", - "airbnb.com", - "airbnb.co.ve" - ], - [ - "airnewzealand.co.nz", - "airnewzealand.com", - "airnewzealand.com.au" - ], - [ - "albertsons.com", - "acmemarkets.com", - "carrsqc.com", - "jewelosco.com", - "pavilions.com", - "randalls.com", - "safeway.com", - "shaws.com", - "starmarket.com", - "tomthumb.com", - "vons.com" - ], - [ - "alelo.com.br", - "meualelo.com.br" - ], - [ - "alibaba.com", - "aliexpress.com" - ], - [ - "alltrails.com", - "alltrails.io" - ], - [ - "amazon.com", - "amazon.ae", - "amazon.com.au", - "amazon.com.br", - "amazon.ca", - "amazon.fr", - "amazon.de", - "amazon.in", - "amazon.it", - "amazon.com.mx", - "amazon.nl", - "amazon.es", - "amazon.com.tr", - "amazon.co.uk", - "amazon.sa", - "amazon.sg", - "amazon.se", - "amazon.pl" - ], - [ - "amcrestcloud.com", - "amcrestview.com" - ], - [ - "americastestkitchen.com", - "cooksillustrated.com", - "cookscountry.com", - "onlinecookingschool.com" - ], - [ - "ameritrade.com", - "tdameritrade.com" - ], - [ - "ana.co.jp", - "astyle.jp" - ], - [ - "angel.co", - "wellfound.com" - ], - [ - "anthem.com", - "sydneyhealth.com" - ], - [ - "anylist.com", - "anylistapp.com" - ], - [ - "appannie.com", - "data.ai" - ], - [ - "apple.com", - "icloud.com" - ], - [ - "atlassian.com", - "trello.com" - ], - [ - "att.com", - "att.net" - ], - [ - "audi.com", - "audiusa.com" - ], - [ - "bahn.de", - "bahn.com" - ], - [ - "battle.net", - "blizzard.com" - ], - [ - "beachbodyondemand.com", - "teambeachbody.com" - ], - [ - "beavercreek.com", - "breckenridge.com", - "epicpass.com", - "keystoneresort.com", - "kirkwood.com", - "mountsunapee.com", - "northstarcalifornia.com", - "okemo.com", - "parkcitymountain.com", - "skicb.com", - "skiheavenly.com", - "snow.com", - "stevenspass.com", - "stowe.com", - "vail.com", - "whistlerblackcomb.com" - ], - [ - "bgg.cc", - "boardgamegeek.com", - "rpggeek.com", - "videogamegeek.com" - ], - [ - "boingo.com", - "boingohotspot.com" - ], - [ - "bol.com", - "kobo.com" - ], - [ - "boudinbakery.com", - "boudincatering.com" - ], - [ - "braze.com", - "braze.eu" - ], - [ - "capitalone.com", - "capitalone360.com" - ], - [ - "cathaypacific.com", - "asiamiles.com" - ], - [ - "centralfcu.org", - "centralfcu.com" - ], - [ - "citi.com", - "citibank.com", - "citibankonline.com" - ], - [ - "comcast.net", - "xfinity.com" - ], - [ - "coolblue.nl", - "coolblue.be", - "coolblue.de" - ], - [ - "curbed.com", - "grubstreet.com", - "nymag.com", - "thecut.com", - "vulture.com" - ], - [ - "dan.org", - "diversalertnetwork.org" - ], - [ - "dinersclubnorthamerica.com", - "dinersclubus.com" - ], - [ - "discordapp.com", - "discord.com" - ], - [ - "discordmerch.com", - "discord.store" - ], - [ - "discovercard.com", - "discover.com" - ], - [ - "dish.com", - "mydish.com", - "dishnetwork.com" - ], - [ - "disney.com", - "disneyplus.com", - "disneystore.com", - "espn.com", - "go.com", - "hulu.com", - "shopdisney.com" - ], - [ - "dnt.abine.com", - "ironvest.com" - ], - [ - "docusign.com", - "docusign.net" - ], - [ - "drivethrucards.com", - "drivethrucomics.com", - "drivethrufiction.com", - "drivethrurpg.com", - "dmsguild.com", - "pathfinderinfinite.com", - "storytellersvault.com", - "wargamevault.com" - ], - [ - "dropbox.com", - "getdropbox.com" - ], - [ - "eater.com", - "polygon.com", - "sbnation.com", - "theverge.com" - ], - [ - "ebay.at", - "ebay.be", - "ebay.ca", - "ebay.ch", - "ebay.cn", - "ebay.co.th", - "ebay.co.uk", - "ebay.com", - "ebay.com.au", - "ebay.com.hk", - "ebay.com.my", - "ebay.com.sg", - "ebay.com.tw", - "ebay.de", - "ebay.es", - "ebay.fr", - "ebay.ie", - "ebay.it", - "ebay.nl", - "ebay.ph", - "ebay.pl", - "ebay.vn" - ], - [ - "epicgames.com", - "unrealengine.com" - ], - [ - "eurosport.no", - "eurosportplayer.com" - ], - [ - "eventbrite.at", - "eventbrite.be", - "eventbrite.ca", - "eventbrite.ch", - "eventbrite.cl", - "eventbrite.co", - "eventbrite.com", - "eventbrite.de", - "eventbrite.dk", - "eventbrite.es", - "eventbrite.fi", - "eventbrite.fr", - "eventbrite.hk", - "eventbrite.ie", - "eventbrite.in", - "eventbrite.it", - "eventbrite.my", - "eventbrite.nl", - "eventbrite.ph", - "eventbrite.pt", - "eventbrite.se", - "eventbrite.sg" - ], - [ - "facebook.com", - "messenger.com" - ], - [ - "fancourier.ro", - "selfawb.ro" - ], - [ - "fandangonow.com", - "fandango.com" - ], - [ - "fidelity.com", - "fidelityinvestments.com" - ], - [ - "flyblade.com", - "blade.com" - ], - [ - "flyingblue.com", - "klm.com" - ], - [ - "fnac.com", - "fnacspectacles.com" - ], - [ - "fourleaf.net", - "fourleaf.cl" - ], - [ - "foursquare.com", - "swarmapp.com" - ], - [ - "gazduire.com.ro", - "gazduire.net", - "admin.ro" - ], - [ - "glassdoor.ca", - "glassdoor.com", - "glassdoor.com.ar" - ], - [ - "gogoair.com", - "gogoinflight.com" - ], - [ - "hbo.com", - "hbomax.com", - "hbonow.com", - "max.com" - ], - [ - "heroku.com", - "verify.salesforce.com" - ], - [ - "igen.fr", - "watchgeneration.fr", - "macg.co" - ], - [ - "ikonpass.com", - "skilynx.com" - ], - [ - "ing.de", - "ing.com" - ], - [ - "instagram.com", - "threads.net" - ], - [ - "intuit.com", - "mint.com" - ], - [ - "kaiserpermanente.org", - "kp.org" - ], - [ - "kclibrary.overdrive.com", - "kclibrary.bibliocommons.com" - ], - [ - "kcls.bibliocommons.com", - "kcls.overdrive.com", - "kcls.org" - ], - [ - "letsdeel.com", - "deel.com" - ], - [ - "liebherr.com", - "myliebherr.com" - ], - [ - "login.airfrance.com", - "login.flyingblue.com", - "login.klm.com" - ], - [ - "logitech.com", - "logitechg.com", - "logi.com", - "astrogaming.com", - "ultimateears.com" - ], - [ - "lookmark.io", - "lookmark.link" - ], - [ - "lrz.de", - "mwn.de", - "mytum.de", - "tum.de", - "tum.edu" - ], - [ - "lufthansa.com", - "miles-and-more.com" - ], - [ - "marriott.com", - "marriottrewards.com", - "ritzcarlton.com", - "spg.com", - "starwoodhotels.com" - ], - [ - "mercadolibre.cl", - "mercadolibre.co.cr", - "mercadolibre.com.ar", - "mercadolibre.com.bo", - "mercadolibre.com.co", - "mercadolibre.com.do", - "mercadolibre.com.ec", - "mercadolibre.com.gt", - "mercadolibre.com.hn", - "mercadolibre.com.mx", - "mercadolibre.com.ni", - "mercadolibre.com.pa", - "mercadolibre.com.pe", - "mercadolibre.com.py", - "mercadolibre.com.sv", - "mercadolibre.com.uy", - "mercadolibre.com.ve", - "mercadopago.cl", - "mercadopago.com.ar", - "mercadopago.com.co", - "mercadopago.com.ec", - "mercadopago.com.mx", - "mercadopago.com.pe", - "mercadopago.com.uy", - "mercadopago.com.ve", - "mercadolibre.com" - ], - [ - "mercadolivre.com.br", - "mercadopago.com.br", - "mercadolivre.com" - ], - [ - "microsoft.com", - "live.com", - "microsoftonline.com", - "office.com", - "skype.com", - "onenote.com", - "hotmail.com", - "azure.com" - ], - [ - "minecraft.net", - "mojang.com" - ], - [ - "moneybird.nl", - "moneybird.de", - "moneybird.com" - ], - [ - "mytotalconnectcomfort.com", - "tccna.honeywell.com" - ], - [ - "myuhc.com", - "uhc.com", - "optum.com", - "optumrx.com" - ], - [ - "neatorama.com", - "neatoshop.com" - ], - [ - "nebula.app", - "watchnebula.com", - "nebula.tv" - ], - [ - "newyorker.com", - "vanityfair.com" - ], - [ - "nextinpact.com", - "next.ink" - ], - [ - "nintendolife.com", - "purexbox.com", - "pushsquare.com" - ], - [ - "nokia.com", - "alcatel-lucent.com", - "nsn-rdnet.net", - "nsn.com" - ], - [ - "nordvpn.com", - "nordpass.com", - "nordaccount.com" - ], - [ - "norwegian.com", - "norwegianreward.com" - ], - [ - "olo.com", - "olo.express" - ], - [ - "overstock.com", - "bedbathandbeyond.com" - ], - [ - "parkmobile.us", - "parkmobile.io" - ], - [ - "pinterest.com", - "pinterest.ca", - "pinterest.co.uk", - "pinterest.fr", - "pinterest.de", - "pinterest.es", - "pinterest.com.au", - "pinterest.se", - "pinterest.ph", - "pinterest.ch", - "pinterest.com.mx", - "pinterest.dk", - "pinterest.pt", - "pinterest.ru", - "pinterest.it", - "pinterest.at", - "pinterest.jp", - "pinterest.cl", - "pinterest.ie", - "pinterest.co.kr", - "pinterest.nz" - ], - [ - "pocket.com", - "getpocket.com" - ], - [ - "postnl.nl", - "postnl.be" - ], - [ - "pretendo.network", - "pretendo.cc" - ], - [ - "probikeshop.fr", - "bikeshop.es", - "probikeshop.it", - "probikeshop.pt", - "probikeshop.com" - ], - [ - "proton.me", - "protonvpn.com", - "protonmail.ch", - "protonmail.com" - ], - [ - "qnap.com", - "myqnapcloud.com" - ], - [ - "questdiagnostics.com", - "care360.com" - ], - [ - "quicken.com", - "simplifimoney.com" - ], - [ - "raywenderlich.com", - "kodeco.com" - ], - [ - "redis.com", - "redislabs.com" - ], - [ - "rocketaccount.com", - "rocketmortgage.com" - ], - [ - "s.activision.com", - "profile.callofduty.com" - ], - [ - "scholarshare529.com", - "secureaccountview.com" - ], - [ - "scottscheapflights.com", - "going.com" - ], - [ - "scoutingevent.com", - "campreservation.com" - ], - [ - "scribbr.com", - "scribbr.de", - "scribbr.dk", - "scribbr.es", - "scribbr.fi", - "scribbr.fr", - "scribbr.it", - "scribbr.nl", - "scribbr.no", - "scribbr.se" - ], - [ - "seattle.bibliocommons.com", - "spl.overdrive.com", - "spl.org" - ], - [ - "sfpl.bibliocommons.com", - "sfpl.overdrive.com" - ], - [ - "slcl.overdrive.com", - "slcl.org" - ], - [ - "slpl.bibliocommons.com", - "slpl.overdrive.com" - ], - [ - "sonyentertainmentnetwork.com", - "sony.com" - ], - [ - "spark.net", - "jdate.com" - ], - [ - "spirit.com", - "spirit-airlines.com" - ], - [ - "springfield.overdrive.com", - "coolcat.org" - ], - [ - "square.com", - "squareup.com" - ], - [ - "stackoverflow.com", - "askubuntu.com", - "serverfault.com", - "stackexchange.com", - "superuser.com" - ], - [ - "steampowered.com", - "steamcommunity.com" - ], - [ - "taxhawk.com", - "freetaxusa.com", - "express1040.com" - ], - [ - "telegram.me", - "telegram.org" - ], - [ - "telekom-dienste.de", - "accounts.login.idm.telekom.com" - ], - [ - "tesla.com", - "teslamotors.com" - ], - [ - "ticketmaster.com", - "livenation.com" - ], - [ - "ting.com", - "tingmobile.com" - ], - [ - "tp-link.com", - "tplinkcloud.com" - ], - [ - "transferwise.com", - "wise.com" - ], - [ - "turkishairlines.com", - "thy.com" - ], - [ - "tvnow.de", - "tvnow.at", - "tvnow.ch", - "auth.rtl.de", - "rtlplus.de", - "rtlplus.com" - ], - [ - "twitter.com", - "x.com" - ], - [ - "ubi.com", - "ubisoft.com" - ], - [ - "umsystem.edu", - "mst.edu", - "umkc.edu", - "umsl.edu", - "missouri.edu" - ], - [ - "united.com", - "unitedwifi.com" - ], - [ - "uspowerboating.com", - "ussailing.org" - ], - [ - "verizon.com", - "verizonwireless.com", - "vzw.com" - ], - [ - "wacom.eu", - "wacom.com" - ], - [ - "wayfair.com", - "wayfair.ca", - "jossandmain.com", - "allmodern.com", - "perigold.com", - "birchlane.com" - ], - [ - "wellsfargo.com", - "wellsfargoadvisors.com" - ], - [ - "wiimmfi.de", - "wii-homebrew.com" - ], - [ - "wikipedia.org", - "mediawiki.org", - "wikibooks.org", - "wikidata.org", - "wikinews.org", - "wikiquote.org", - "wikisource.org", - "wikiversity.org", - "wikivoyage.org", - "wiktionary.org", - "commons.wikimedia.org", - "meta.wikimedia.org", - "incubator.wikimedia.org", - "outreach.wikimedia.org", - "species.wikimedia.org", - "wikimania.wikimedia.org" - ], - [ - "williams-sonoma.com", - "markandgraham.com", - "potterybarn.com", - "westelm.com" - ], - [ - "wilson.com", - "slugger.com", - "atecsports.com", - "demarini.com", - "evoshield.com", - "luxilon.com" - ], - [ - "worldlink.com.np", - "nettv.com.np" - ], - [ - "wsj.com", - "dowjones.com" - ], - [ - "www.seek.com.au", - "www.seek.co.nz", - "jobsdb.com", - "hk.jobsdb.com", - "sg.jobsdb.com", - "th.jobsdb.com", - "jobstreet.com", - "myjobstreet.jobstreet.co.id", - "myjobstreet.jobstreet.com.my", - "myjobstreet.jobstreet.com.ph", - "myjobstreet.jobstreet.com.sg", - "login.seek.com" - ], - [ - "www.vistaprint.ca", - "account.vistaprint.com" - ], - [ - "youneedabudget.com", - "ynab.com" - ], - [ - "zixmail.net", - "zixmessagecenter.com" - ] -] diff --git a/tools/convert-shared-credential-to-legacy-format.rb b/tools/convert-shared-credential-to-legacy-format.rb index 955df191f..9c149e241 100755 --- a/tools/convert-shared-credential-to-legacy-format.rb +++ b/tools/convert-shared-credential-to-legacy-format.rb @@ -3,11 +3,22 @@ require 'json' require 'optparse' +name_of_script = File.basename $0 +BANNER = "Usage: #{name_of_script} [options] " +USAGE_MESSAGE = <<-END +This script converts shared-credentials.json and shared-credentials-historical.json into the legacy +format (previously contained in websites-with-shared-credential-backends.json). +END + options = {} -OptionParser.new do |opts| - opts.on("--verify", "Verify that the generated file is up-to-date.") do |v| +option_parser = OptionParser.new(BANNER, 25) do |parser| + parser.on("--verify", "Verify that the generated file is up-to-date.") do |v| options[:verify] = v end + parser.on_tail("-h", "--help", 'Show this message') do + puts parser, "", USAGE_MESSAGE + exit + end end.parse! tools_dir = __dir__ @@ -16,7 +27,12 @@ shared_credentials_file_path = File.join quirks_dir, "shared-credentials.json" shared_credentials_historical_file_path = File.join quirks_dir, "shared-credentials-historical.json" -output_file_path = File.join quirks_dir, "websites-with-shared-credential-backends.json" + +output_file_path = ARGV.shift +if !output_file_path + puts BANNER + exit 1 +end legacy_output_array = [] @@ -49,7 +65,7 @@ def addEntriesToLegacyOutputArray(file_path, legacy_output_array) if options[:verify] current_file_contents = File.read output_file_path if current_file_contents != json_to_output - STDERR.puts "ERROR: #{File.basename output_file_path} is not up-to-date. Please run this script again and commit the changes." + STDERR.puts "ERROR: #{File.basename output_file_path} is not up-to-date." exit 1 end else