mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-06-30 22:11:46 +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 41d23c244e5e87fdeac75820919adfb5ab6e3d1d..420c6f62d6bd1c3c39023d17ccb3afbb0e5f90d5 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 (nbt.contains("Id", 8)) {
|
||
|
- uUID = UUID.fromString(nbt.getString("Id"));
|
||
|
+ // Scissors start - Validate String UUIDs in game profiles
|
||
|
+ try {
|
||
|
+ uUID = UUID.fromString(nbt.getString("Id"));
|
||
|
+ } catch (Exception ignored) {
|
||
|
+ }
|
||
|
+ // Scissors end
|
||
|
}
|
||
|
// Paper end
|
||
|
|