Refactored CSRF sample protection based on ESAPI