<% '======================================================================================================================= ' CSRF helpers: thin wrappers over the core HTMLSecurity token (one token per form family name, stored in the session) '======================================================================================================================= Function Csrf_Token(name) Csrf_Token = HTMLSecurity().GetAntiCSRFToken(name) End Function ' True only for a non-empty token that matches the session's token for this form family. Function Csrf_Valid(name, token) Csrf_Valid = (Len(token) > 0 And HTMLSecurity().IsValidAntiCSRFToken(name, token)) End Function %>