Changes to the functionality and security of the XSRF token function