diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-07-25 21:38:13 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-07-25 21:56:20 -0300 |
commit | 97c48aa55abca34478f470fa99c3a150c6629f16 (patch) | |
tree | 4cb27f57335c19820f8c55047b9df13a275bea5d /src/main/java/ganarchy/friendcode/client | |
parent | 354df6d333ffb7b69e92117406c8ce8d61ea09e0 (diff) |
Fix SAM bridge security
Diffstat (limited to 'src/main/java/ganarchy/friendcode/client')
-rw-r--r-- | src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java b/src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java index 9496942..4bd4971 100644 --- a/src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java +++ b/src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java @@ -2,7 +2,7 @@ package ganarchy.friendcode.client; import ganarchy.friendcode.FriendCode; import ganarchy.friendcode.mixin.FriendCodeIntegratedServerExt; -import net.fabricmc.api.EnvType; +import ganarchy.friendcode.util.KeyUtil;import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.OpenToLanScreen; @@ -137,9 +137,10 @@ public class FriendCodeScreen extends Screen { try { String privateKey = null; if (codeType == CodeType.WORLD) { - // FIXME + // FIXME this currently does nothing. var worldDir = client.getServer().submit(() -> client.getServer().getSavePath(WorldSavePath.ROOT)).join(); var keyFile = worldDir.resolve("friendcode.key"); + privateKey = KeyUtil.readKeyFile(keyFile); } client.loadBlockList(); client.getServer().getNetworkIo().bind(null, port); |