waffle icon indicating copy to clipboard operation
waffle copied to clipboard

Use jna to determine OS type

Open hazendaz opened this issue 7 years ago • 1 comments

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).

hazendaz avatar Jul 04 '18 01:07 hazendaz

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.

dblock avatar Jul 04 '18 06:07 dblock