Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 15 Sep 2002 22:10:50 -0000 1.13 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 17 May 2003 10:04:18 -0000 1.14 @@ -52,14 +52,10 @@ return [ad_parameter -package_id [ad_acs_kernel_id] SessionLifetime security 604800] } -proc sec_sweep_sessions {} { - set current_time [ns_time] - set property_life [sec_session_lifetime] +ad_proc -private sec_sweep_sessions {} { + set expires [expr {[ns_time] - [sec_session_lifetime]}] - db_dml sessions_sweep { - delete from sec_session_properties - where :current_time - last_hit > :property_life - } + db_dml sessions_sweep {} } proc_doc sec_handler {} { @@ -962,7 +958,9 @@ set url [ad_conn url] if { [string match "*register/*" $url] || [string match "/index*" $url] || \ - [string match "/" $url] } { + [string match "/index*" $url] || \ + [string match "/" $url] || \ + [string match "*password-update*" $url] } { return 1 } @@ -990,17 +988,21 @@ @param secret allows the caller to specify a known secret external to the random secret management mechanism. - @param token_id allows the caller to specify a token_id. + @param token_id allows the caller to specify a token_id which is then ignored so don't use it. @param value the value to be signed. } { - # pick a random token_id + if { [empty_string_p $secret] } { - set token_id [sec_get_random_cached_token_id] + if {[empty_string_p $token_id]} { + # pick a random token_id + set token_id [sec_get_random_cached_token_id] + } set secret_token [sec_get_token $token_id] } else { set secret_token $secret } + ns_log Debug "Security: Getting token_id $token_id, value $secret_token"