in reply to
Re^2: Security issue and solution for terminal command accessed by public user
in thread Security issue and solution for terminal command accessed by public user
I would, if you decide to go that route, carefully comment why you're doing it that way, so someone doesn't later come along and decide it would be more "efficient" to change it to
and open you up to the security issues again.
I might also ask, will you really need every conversion that units can do? Or do you have a small set of conversions that can be encapsulated in a few dozen lines at the most? The investment in a bit of conversion code that is definitely safe, versus a security problem waiting to happen, is probably worth it.