security::csrf::fail (private)

 security::csrf::fail

Defined in packages/acs-tcl/tcl/security-procs.tcl

This function is called, when a CSRF validation fails. Unless the current user is swa, it aborts the current request.

Partial Call Graph (max 5 caller/called nodes):
%3 security::csrf::validate security::csrf::validate (public) security::csrf::fail security::csrf::fail security::csrf::validate->security::csrf::fail acs_user::site_wide_admin_p acs_user::site_wide_admin_p (public) security::csrf::fail->acs_user::site_wide_admin_p ad_log ad_log (public) security::csrf::fail->ad_log ad_page_contract_handle_datasource_error ad_page_contract_handle_datasource_error (public) security::csrf::fail->ad_page_contract_handle_datasource_error ad_script_abort ad_script_abort (public) security::csrf::fail->ad_script_abort

Testcases:
No testcase defined.
Source code:
        ad_log Warning "CSRF failure"
        if {[acs_user::site_wide_admin_p]} {
            ns_log notice "would abort if not swa: [ns_conn request]"
        } else {
            ad_page_contract_handle_datasource_error "Invalid request token (potential Cross-Site Request Forgery)"
            ad_script_abort
        }
Generic XQL file:
packages/acs-tcl/tcl/security-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/security-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/security-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: