waffle
waffle copied to clipboard
Use jna to determine OS type
Since #636 uses a system environment variable to find windows which could potentially be manipulated, use jna instead as pointed out by @dblock
This seems hacky at best ;) Since waffle uses [JNA] (https://github.com/java-native-access/jna/blob/master/src/com/sun/jna/Platform.java#L137).
The code to change is here: https://github.com/Waffle/waffle/pull/636/files#diff-0307661bd1fa164c209546fa06ec2b48R542.
If I read https://dzone.com/articles/how-to-change-environment-variables-in-java correctly other filters can modify these at runtime, sounds like an additional security risk.