mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-07-08 01:40:00 +00:00
26 lines
1.0 KiB
Diff
26 lines
1.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Video <videogamesm12@gmail.com>
|
|
Date: Wed, 30 Mar 2022 02:01:55 -0600
|
|
Subject: [PATCH] Validate String UUIDs during the CompoundTag -> GameProfile
|
|
conversion process
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
|
index fe87de42bc099ce41038f7f49ded9a12898e32eb..07fc1fefcea853ac0aa355312d8c718dc3a4ddd7 100644
|
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
|
@@ -77,7 +77,12 @@ public final class NbtUtils {
|
|
}
|
|
// Paper start - support string UUID's
|
|
if (compound.contains("Id", 8)) {
|
|
- uUID = UUID.fromString(compound.getString("Id"));
|
|
+ // Scissors start - Validate String UUIDs in game profiles
|
|
+ try {
|
|
+ uUID = UUID.fromString(compound.getString("Id"));
|
|
+ } catch (Exception ignored) {
|
|
+ }
|
|
+ // Scissors end
|
|
}
|
|
// Paper end
|
|
|