Skip to content

Commit b338145

Browse files
authored
Use urlsafe_b64encode for hash generation. (#7862)
This replaces the b64 characters "+" and "/" with "-" and "_" and avoids parsing issues as the matrix grows.
1 parent 3183818 commit b338145

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/actions/workflow-build/build-workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def generate_guids():
8888
i = 0
8989
while True:
9090
# Generates a base64 hash of an incrementing 16-bit integer:
91-
hash = base64.b64encode(struct.pack(">H", i)).decode("ascii")
91+
hash = base64.urlsafe_b64encode(struct.pack(">H", i)).decode("ascii")
9292
# Strips off up-to 2 leading 'A' characters and a single trailing '=' characters, if they exist:
9393
guid = re.sub(r"^A{0,2}", "", hash).removesuffix("=")
9494
yield guid

0 commit comments

Comments
 (0)