Revert "Security fixes"

This reverts commit fb540ed2c4271b02bf211857f31b3ae100981fd8.