gustafn
committed
on 03 Mar
fixed variable name
openacs-4/.../tcl/utilities-procs.tcl (+3 -3)
3889 3889     @param with_headers Include request headers
3890 3890     @author Gustaf Neumann
3891 3891
3892 3892 } {
3893 3893     set info ""
3894 3894     if {[ns_conn isconnected]} {
3895 3895         #
3896 3896         # Base information
3897 3897         #
3898 3898         append info "    " \
3899 3899             [ns_conn method] \
3900 3900             " [util_current_location][ns_conn url]?[ns_conn query]" \
3901 3901             " referred by '[get_referrer]' peer [ad_conn peeraddr] user_id [ad_conn user_id]"
3902 3902
3903 3903         if {[ns_conn method] eq "POST"} {
3904 3904             #
3905 3905             # Include form data when it is available via [ns_form],
3906 3906             # but remove sensible information from logging.
3907 3907             #
3908 3908             set form [ns_getform]
3909               if {[ns_set get $f password] ne ""} {
3910                   ns_set iupdate $f password XXXXX
  3909             if {[ns_set get $form password] ne ""} {
  3910                 ns_set iupdate $form password XXXXX
3911 3911             }
3912 3912             foreach {k v} [ns_set array $form] {
3913 3913                 if {[string length $v] > 100} {
3914 3914                     set v "[string range $v 0 100]..."
3915 3915                 }
3916 3916                 append info "\n        $k: $v"
3917 3917             }
3918 3918         }
3919 3919         #
3920 3920         # Optional header info
3921 3921         #
3922 3922         if {$with_headers_p} {
3923 3923             append info \n [util::ns_set_pretty_print [ns_conn headers]]
3924 3924         }
3925 3925     }
3926 3926     return $info
3927 3927 }
3928 3928
3929 3929 ad_proc util::trim_leading_zeros {
3930 3930     string