thefightagainstmalware / NoSession

NoSession: Security done right
MIT License
17 stars 1 forks source link

Utils.getLibraryPathAsFile -> java.net.URISyntaxException: Illegal character in path #20

Closed Commandcracker closed 8 months ago

Commandcracker commented 9 months ago

https://github.com/thefightagainstmalware/NoSession/blob/083d41de91f1e2862cfff045dbd3828f5cc45a8f/src/main/java/gq/malwarefight/nosession/utils/Utils.java#L153

[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]: java.net.URISyntaxException: Illegal character in path at index 88: file:/home/red/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/PVP 1.8.9 nm/.minecraft/mods/!.jar
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at java.net.URI$Parser.fail(URI.java:2847)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at java.net.URI$Parser.checkChars(URI.java:3020)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at java.net.URI$Parser.parseHierarchical(URI.java:3104)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at java.net.URI$Parser.parse(URI.java:3052)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at java.net.URI.<init>(URI.java:588)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at gq.malwarefight.nosession.utils.Utils.getLibraryPathAsFile(Utils.java:153)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at gq.malwarefight.nosession.utils.Utils.getLibraryPath(Utils.java:157)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at gq.malwarefight.nosession.utils.Utils.getClasspath(Utils.java:163)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at gq.malwarefight.nosession.utils.Utils.setToken(Utils.java:196)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at gq.malwarefight.nosession.NoSessionLoadingPlugin.<clinit>(NoSessionLoadingPlugin.java:207)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at java.lang.Class.forName0(Native Method)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at java.lang.Class.forName(Class.java:348)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraftforge.fml.relauncher.CoreModManager.loadCoreMod(CoreModManager.java:536)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraftforge.fml.relauncher.CoreModManager.discoverCoreMods(CoreModManager.java:416)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraftforge.fml.relauncher.CoreModManager.handleLaunch(CoreModManager.java:246)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupHome(FMLLaunchHandler.java:95)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupClient(FMLLaunchHandler.java:72)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraftforge.fml.relauncher.FMLLaunchHandler.configureForClientLaunch(FMLLaunchHandler.java:34)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraftforge.fml.common.launcher.FMLTweaker.injectIntoClassLoader(FMLTweaker.java:119)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)
[11:44:04] [main/INFO] [STDERR]: [gq.malwarefight.nosession.NoSessionLoadingPlugin:<clinit>:235]:   at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]: java.lang.ExceptionInInitializerError
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at java.lang.Class.forName0(Native Method)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at java.lang.Class.forName(Class.java:348)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraftforge.fml.relauncher.CoreModManager.loadCoreMod(CoreModManager.java:536)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraftforge.fml.relauncher.CoreModManager.discoverCoreMods(CoreModManager.java:416)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraftforge.fml.relauncher.CoreModManager.handleLaunch(CoreModManager.java:246)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupHome(FMLLaunchHandler.java:95)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupClient(FMLLaunchHandler.java:72)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraftforge.fml.relauncher.FMLLaunchHandler.configureForClientLaunch(FMLLaunchHandler.java:34)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraftforge.fml.common.launcher.FMLTweaker.injectIntoClassLoader(FMLTweaker.java:119)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)
[11:44:04] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:99]:     at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:635]: Caused by: java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 88: file:/home/red/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/PVP 1.8.9 nm/.minecraft/mods/!.jar
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:635]:     at gq.malwarefight.nosession.NoSessionLoadingPlugin.<clinit>(NoSessionLoadingPlugin.java:236)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:635]:     ... 14 more
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]: Caused by: java.net.URISyntaxException: Illegal character in path at index 88: file:/home/red/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/PVP 1.8.9 nm/.minecraft/mods/!.jar
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at java.net.URI$Parser.fail(URI.java:2847)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at java.net.URI$Parser.checkChars(URI.java:3020)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at java.net.URI$Parser.parseHierarchical(URI.java:3104)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at java.net.URI$Parser.parse(URI.java:3052)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at java.net.URI.<init>(URI.java:588)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at gq.malwarefight.nosession.utils.Utils.getLibraryPathAsFile(Utils.java:153)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at gq.malwarefight.nosession.utils.Utils.getLibraryPath(Utils.java:157)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at gq.malwarefight.nosession.utils.Utils.getClasspath(Utils.java:163)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at gq.malwarefight.nosession.utils.Utils.setToken(Utils.java:196)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     at gq.malwarefight.nosession.NoSessionLoadingPlugin.<clinit>(NoSessionLoadingPlugin.java:207)
[11:44:04] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:644]:     ... 14 more
[11:44:04] [main/ERROR] [FML]: An error occurred trying to configure the minecraft home at /home/red/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/PVP 1.8.9 nm/.minecraft for Forge Mod Loader
java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method) ~[?:1.8.0_392]
    at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_392]
    at net.minecraftforge.fml.relauncher.CoreModManager.loadCoreMod(CoreModManager.java:536) ~[forge-1.8.9-11.15.1.2318-1.8.9-universal.jar:?]
    at net.minecraftforge.fml.relauncher.CoreModManager.discoverCoreMods(CoreModManager.java:416) ~[forge-1.8.9-11.15.1.2318-1.8.9-universal.jar:?]
    at net.minecraftforge.fml.relauncher.CoreModManager.handleLaunch(CoreModManager.java:246) ~[forge-1.8.9-11.15.1.2318-1.8.9-universal.jar:?]
    at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupHome(FMLLaunchHandler.java:95) [forge-1.8.9-11.15.1.2318-1.8.9-universal.jar:?]
    at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupClient(FMLLaunchHandler.java:72) [forge-1.8.9-11.15.1.2318-1.8.9-universal.jar:?]
    at net.minecraftforge.fml.relauncher.FMLLaunchHandler.configureForClientLaunch(FMLLaunchHandler.java:34) [forge-1.8.9-11.15.1.2318-1.8.9-universal.jar:?]
    at net.minecraftforge.fml.common.launcher.FMLTweaker.injectIntoClassLoader(FMLTweaker.java:119) [forge-1.8.9-11.15.1.2318-1.8.9-universal.jar:?]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:115) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) [NewLaunch.jar:?]
    at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130) [NewLaunch.jar:?]
    at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?]
Caused by: java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 88: file:/home/red/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/PVP 1.8.9 nm/.minecraft/mods/!.jar
    at gq.malwarefight.nosession.NoSessionLoadingPlugin.<clinit>(NoSessionLoadingPlugin.java:236) ~[!.jar:?]
    ... 14 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 88: file:/home/red/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/PVP 1.8.9 nm/.minecraft/mods/!.jar
    at java.net.URI$Parser.fail(URI.java:2847) ~[?:1.8.0_392]
    at java.net.URI$Parser.checkChars(URI.java:3020) ~[?:1.8.0_392]
    at java.net.URI$Parser.parseHierarchical(URI.java:3104) ~[?:1.8.0_392]
    at java.net.URI$Parser.parse(URI.java:3052) ~[?:1.8.0_392]
    at java.net.URI.<init>(URI.java:588) ~[?:1.8.0_392]
    at gq.malwarefight.nosession.utils.Utils.getLibraryPathAsFile(Utils.java:153) ~[Utils.class:?]
    at gq.malwarefight.nosession.utils.Utils.getLibraryPath(Utils.java:157) ~[Utils.class:?]
    at gq.malwarefight.nosession.utils.Utils.getClasspath(Utils.java:163) ~[Utils.class:?]
    at gq.malwarefight.nosession.utils.Utils.setToken(Utils.java:196) ~[Utils.class:?]
    at gq.malwarefight.nosession.NoSessionLoadingPlugin.<clinit>(NoSessionLoadingPlugin.java:207) ~[!.jar:?]
    ... 14 more
[11:44:04] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.ArrayIndexOutOfBoundsException: 5
[11:44:04] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:21)
[11:44:04] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at java.lang.SecurityManager.checkExit(SecurityManager.java:761)
[11:44:04] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at java.lang.Runtime.exit(Runtime.java:101)
[11:44:04] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at java.lang.System.exit(System.java:987)
[11:44:04] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at org.prismlauncher.EntryPoint.main(EntryPoint.java:75)
Exception caught from launcher
java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at net.minecraftforge.fml.relauncher.CoreModManager.loadCoreMod(CoreModManager.java:536)
    at net.minecraftforge.fml.relauncher.CoreModManager.discoverCoreMods(CoreModManager.java:416)
    at net.minecraftforge.fml.relauncher.CoreModManager.handleLaunch(CoreModManager.java:246)
    at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupHome(FMLLaunchHandler.java:95)
    at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupClient(FMLLaunchHandler.java:72)
    at net.minecraftforge.fml.relauncher.FMLLaunchHandler.configureForClientLaunch(FMLLaunchHandler.java:34)
    at net.minecraftforge.fml.common.launcher.FMLTweaker.injectIntoClassLoader(FMLTweaker.java:119)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)
    at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)
    at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
Caused by: java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 88: file:/home/red/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/PVP 1.8.9 nm/.minecraft/mods/!.jar
    at gq.malwarefight.nosession.NoSessionLoadingPlugin.<clinit>(NoSessionLoadingPlugin.java:236)
    ... 14 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 88: file:/home/red/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/PVP 1.8.9 nm/.minecraft/mods/!.jar
    at java.net.URI$Parser.fail(URI.java:2847)
    at java.net.URI$Parser.checkChars(URI.java:3020)
    at java.net.URI$Parser.parseHierarchical(URI.java:3104)
    at java.net.URI$Parser.parse(URI.java:3052)
    at java.net.URI.<init>(URI.java:588)
    at gq.malwarefight.nosession.utils.Utils.getLibraryPathAsFile(Utils.java:153)
    at gq.malwarefight.nosession.utils.Utils.getLibraryPath(Utils.java:157)
    at gq.malwarefight.nosession.utils.Utils.getClasspath(Utils.java:163)
    at gq.malwarefight.nosession.utils.Utils.setToken(Utils.java:196)
    at gq.malwarefight.nosession.NoSessionLoadingPlugin.<clinit>(NoSessionLoadingPlugin.java:207)
    ... 14 more
Exiting with ERROR
Process exited with code 1.
pandaninjas commented 8 months ago

Fixed in new release, now avaliable on Modrinth and through GitHub releases