mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-30 16:16:00 +00:00
Create 0017-Validate-String-UUIDs-during-the-CompoundTag-GamePro.patch
This commit is contained in:
parent
aa48ad0b21
commit
6725d50dcf
@ -0,0 +1,25 @@
|
|||||||
|
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 29b8519a1dd954f004bf04145e7246e3d2592b77..c1389a6608f19c9b293755abad97db1cc6b02f3c 100644
|
||||||
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
|
@@ -76,7 +76,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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user