template::csrf::validate (public)

 template::csrf::validate [ -package_id package_id ]

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

validate a csrf token

Switches:
-package_id (optional)
Author:
Gustaf Neumann
Created:
Feb 2, 2017

Partial Call Graph (max 5 caller/called nodes):
%3 ad_conn ad_conn (public) parameter::get parameter::get (public) security::csrf::validate security::csrf::validate (public) template::csrf::validate template::csrf::validate template::csrf::validate->ad_conn template::csrf::validate->parameter::get template::csrf::validate->security::csrf::validate

Testcases:
No testcase defined.
Source code:
        if {![info exists package_id]} {
            if {![ns_conn isconnected]} {
                return 0
            }
            set package_id [ad_conn package_id]
        }
        set validateCSRF_p [parameter::get  -package_id $package_id  -parameter "ValidateCSRFP"  -default 1]

        if {$validateCSRF_p ne "" && $validateCSRF_p} {
            security::csrf::validate
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: