ad_safe_eval (public)

 ad_safe_eval [ args... ]

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

Version of "eval" that checks its arguments for brackets that may be used to execute unsafe code. There are actually better ways in Tcl to achieve this, but it is kept for backwards compatibility.

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_safe_eval ad_safe_eval (test acs-tcl) ad_safe_eval ad_safe_eval test_ad_safe_eval->ad_safe_eval acs_mail_lite::imap_check_incoming acs_mail_lite::imap_check_incoming (private) acs_mail_lite::imap_check_incoming->ad_safe_eval acs_mail_lite::maildir_check_incoming acs_mail_lite::maildir_check_incoming (private) acs_mail_lite::maildir_check_incoming->ad_safe_eval

Testcases:
ad_safe_eval
Source code:
    foreach arg $args {
        if { [string match {*[\[;]*} $arg] } {
            return -code error "Unsafe argument to ad_safe_eval: $arg"
        }
    }
    return [uplevel {*}$args]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

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