Index: openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl,v diff -u -r1.93.2.67 -r1.93.2.68 --- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 29 Nov 2023 08:16:36 -0000 1.93.2.67 +++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 15 Feb 2024 12:27:30 -0000 1.93.2.68 @@ -134,6 +134,24 @@ error "value '$value' of parameter $name is invalid" } } + :method type=dbtext {name value arg} { + # + # Ensure that the value can be used in an SQL query. + # + # Note that this is not the same as quoting or otherwise + # ensuring the safety of the statement itself. What we enforce + # here is that the value will be accepted by the db interface + # without complaining. The actual definition may change or be + # database specific in the future. + # + + # + # Reject the NUL character + # + if {[regexp \u00 $value]} { + error "value '$value' of parameter $name contains the NUL character" + } + } :method type=signed {name input} { # # Check, if a value is a signed value, signed by