Terasology currently whitelists the entire java.awt package in ExternalApiWhitelist.java, which might lead to some modules posing a security risk.
Taking a look at the list of classes in the awt package here, these are the potentially unsafe classes in the package:
Here is a list of awt classes currently in use by some of Terasology's larger modules (and their dependencies):
Josharias Survival:
java.awt.Color
java.awt.Image
Light and Shadow:
java.awt.Color
java.awt.Stroke
java.awt.Graphics2D
java.awt.BasicStroke
Gooey's Quests with CoreGameplay:
works fine without any awt classes
Medieval Cities:
works fine without any awt classes as well, although I did face a NPE which repeatedly occurs until I leave the game (even with the whole awt package enabled) - https://hastebin.com/ewoqidufej.swift
P.S. Also found this comment about exploitable Java methods if anyone is interested http://stackoverflow.com/a/4351516
Taking a look at the list of classes in the awt package here, these are the potentially unsafe classes in the package:
- Robot - allows for the simulation of native keyboard and mouse input events
- Desktop - allows the launching of associated applications registered on the desktop to handle a URI or file, such as the web browser, mail client and other registered applications
- FileDialog - allows the module to display a dialog from which the user can select a file. This might be unsafe when combined with java.awt.Robot.
- SystemTray - allows the module to manipulate (add and remove) tray icons from the system tray
- KeyboardFocusManager - allows the module to manage active and focused windows, potentially allowing them to initiate changes in focus
- PrintJob - allows the module to initiate and execute printing. This is probably not exactly 'unsafe' but I thought that I would just include it since it involves interaction with an external device.
- AWTPermission - Permissions are defined in the policy file which modules should not have access to, but still a good thing to take note of.
Here is a list of awt classes currently in use by some of Terasology's larger modules (and their dependencies):
Josharias Survival:
java.awt.Color
java.awt.Image
Light and Shadow:
java.awt.Color
java.awt.Stroke
java.awt.Graphics2D
java.awt.BasicStroke
Gooey's Quests with CoreGameplay:
works fine without any awt classes
Medieval Cities:
works fine without any awt classes as well, although I did face a NPE which repeatedly occurs until I leave the game (even with the whole awt package enabled) - https://hastebin.com/ewoqidufej.swift
P.S. Also found this comment about exploitable Java methods if anyone is interested http://stackoverflow.com/a/4351516
Last edited: