Adding security tests and fixing security bugs
Merge pull request #700 from wpreul/master

Adding security tests and fixing security bugs