Fix for security of publish.php

Fix for issue #65