fix some security bugs
Merge remote-tracking branch 'origin/master'