CSRF test to new code
Merge pull request #867 from mfalesni/test_csrf

CSRF test to new code