Fix security bug that allows running arbitrary user code.

https://bugzilla.redhat.com/show_bug.cgi?id=950777