Index: openacs-4/packages/acs-admin/www/test/signed-cookies-test-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/test/signed-cookies-test-2.tcl,v diff -u -N --- openacs-4/packages/acs-admin/www/test/signed-cookies-test-2.tcl 16 Dec 2019 17:14:37 -0000 1.4.2.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,129 +0,0 @@ -ad_page_contract { - - A quick and dirty test page for signed cookies. Reads signed - previously signed cookies and verifies. Also contains a set of - regression tests for the secure_tokens ns_cache.a - - @author Richard Li (richardl@arsdigita.com) - @cvs-id $Id: signed-cookies-test-2.tcl,v 1.4.2.1 2019/12/16 17:14:37 antoniop Exp $ - @creation-date 19 October 2000 - -} - -set cookie_value [ad_get_cookie testcookie] - -set cookie_data [split $cookie_value {,}] -set cookie_data_length [llength $cookie_data] - -set hash [lindex $cookie_data $cookie_data_length-1] -set max_age [lindex $cookie_data $cookie_data_length-2] -set token_id [lindex $cookie_data $cookie_data_length-3] - -if { $cookie_data_length == 4 } { - # no commas in data - set data [lindex $cookie_data 0] -} else { - # join the data using commas - set data [join [lrange $cookie_data 0 $cookie_data_length-4] {,}] -} - -set secret_token hello - -set computed_hash [ns_sha1 "$data$token_id$max_age$secret_token"] - -set list_of_names [ns_cache names secret_tokens] - -set list_length [llength $list_of_names] - -util_return_headers - -ns_write " -[ad_header "signed cookies tests"] - - -

Cookie Information

- - - -

secret_token Cache Tests

- - - -[ad_footer] - -" -# Local variables: -# mode: tcl -# tcl-indent-level: 4 -# indent-tabs-mode: nil -# End: