From 1b1ed9bf3f0516f96651e8b5fbf7bcea82f4a232 Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Wed, 25 Jun 2025 23:20:08 -0400 Subject: [PATCH] UrlEncode patterns in cosmetics.json (#1273) ## Description: Use base64url encoding for patterns. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors --- resources/cosmetics/cosmetics.json | 34 +++++++++++++++--------------- src/core/Schemas.ts | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/resources/cosmetics/cosmetics.json b/resources/cosmetics/cosmetics.json index e890ba648..9126948cc 100644 --- a/resources/cosmetics/cosmetics.json +++ b/resources/cosmetics/cosmetics.json @@ -4,35 +4,35 @@ "creator": ["1286745100411473930"] }, "patterns": { - "ABMIVVU=": { + "ABMIVVU": { "name": "stripes_v" }, - "ABMIDw8=": { + "ABMIDw8": { "name": "stripes_h" }, - "ABMIpaU=": { + "ABMIpaU": { "name": "checkerboard" }, - "AFIoAAABOEAHgkAc+AN/4AMcgAAA": { + "AFIoAAABOEAHgkAc-AN_4AMcgAAA": { "name": "choco" }, - "AHE4AQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIA=": { + "AHE4AQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIA": { "name": "diagonal", "role_group": "donor" }, - "AHE4AYACQAQgCBAQCCAEQAKAAYABQAIgBBAICBAEIAJAAYA=": { + "AHE4AYACQAQgCBAQCCAEQAKAAYABQAIgBBAICBAEIAJAAYA": { "name": "cross", "role_group": "donor" }, - "AHEYA8AMMDAMwAPAAzAMDDADwA==": { + "AHEYA8AMMDAMwAPAAzAMDDADwA": { "name": "mini_cross", "role_group": "donor" }, - "AHE4//8AAAAAAAAAAAAAAAAAAP//AAAAAAAAAAAAAAAAAAA=": { + "AHE4__8AAAAAAAAAAAAAAAAAAP__AAAAAAAAAAAAAAAAAAA": { "name": "horizontal_stripes", "role_group": "donor" }, - "AHE4AQEAAAAAAAAAAAAAAAAAAAEBAAAAAAAAAAAAAAAAAAA=": { + "AHE4AQEAAAAAAAAAAAAAAAAAAAEBAAAAAAAAAAAAAAAAAAA": { "name": "sparse_dots", "role_group": "donor" }, @@ -40,35 +40,35 @@ "name": "evan", "role_group": "creator" }, - "AHEYAYACQAQgCBAQCCAEQAKAAQ==": { + "AHEYAYACQAQgCBAQCCAEQAKAAQ": { "name": "diagonal_stripe", "role_group": "donor" }, - "AHEYAAAYGDw8fn7//35+PDwYGA==": { + "AHEYAAAYGDw8fn7__35-PDwYGA": { "name": "mountain_ridge", "role_group": "donor" }, - "AHEYAAACIAAAAAAAAAAACBAAAA==": { + "AHEYAAACIAAAAAAAAAAACBAAAA": { "name": "scattered_dots", "role_group": "donor" }, - "AHEYw8PDwwwMDAwwDDAMw8PDww==": { + "AHEYw8PDwwwMDAwwDDAMw8PDww": { "name": "circuit_board", "role_group": "donor" }, - "AHEYSZJJkkmSSZJJkkmSSZJJkg==": { + "AHEYSZJJkkmSSZJJkkmSSZJJkg": { "name": "vertical_bars", "role_group": "donor" }, - "AHEYAAAAAAAAAkCCQUQiLnQWaA==": { + "AHEYAAAAAAAAAkCCQUQiLnQWaA": { "name": "-w-", "role_group": "donor" }, - "AHE4AAAAAKAAUAFQAVABCC4EUCQgJCAEIDgm0BBwDwAAAAA=": { + "AHE4AAAAAKAAUAFQAVABCC4EUCQgJCAEIDgm0BBwDwAAAAA": { "name": "white_rabbit", "role_group": "donor" }, - "AAIiAAAAAAAAAAAAAAAAAAAAAIDD8YnweTiiD5FIYEIgEpkIRCKBCoFIpCIQeTwyPB6RjEAkEIgQKEQiApFAIEIgEYkIOAKfCIGIIyIAAAAAAAAAAAA=": { + "AAIiAAAAAAAAAAAAAAAAAAAAAIDD8YnweTiiD5FIYEIgEpkIRCKBCoFIpCIQeTwyPB6RjEAkEIgQKEQiApFAIEIgEYkIOAKfCIGIIyIAAAAAAAAAAAA": { "name": "openfront", "role_group": "creator" } diff --git a/src/core/Schemas.ts b/src/core/Schemas.ts index 85e6ddd49..44f492563 100644 --- a/src/core/Schemas.ts +++ b/src/core/Schemas.ts @@ -182,7 +182,7 @@ export const FlagSchema = z.string().max(128).optional(); export const RequiredPatternSchema = z .string() .max(128) - .base64() + .base64url() .refine( (val) => { try {