Index: openacs-4/packages/openacs-bootstrap3-theme/resources/templates/packages/search/lib/navbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/templates/packages/search/lib/navbar.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/openacs-bootstrap3-theme/resources/templates/packages/search/lib/navbar.tcl 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/templates/packages/search/lib/navbar.tcl 18 Oct 2016 10:29:34 -0000 1.1.2.1 @@ -17,37 +17,36 @@ if { $current_page_group >= 1 } { set offset [expr {($current_page_group - 1) * $pages_per_group * $limit}] - set url_previous_group [export_vars -base search {{q $urlencoded_query} search_package_id offset num __csrf_token}] + set url_previous_group [export_vars -base search {q search_package_id offset num __csrf_token}] } else { set url_previous_group "" } if { $current_page_group < $last_page_group } { set offset [expr {($current_page_group + 1) * $pages_per_group * $limit}] - set url_next_group [export_vars -base search {{q $urlencoded_query} search_package_id offset num __csrf_token}] + set url_next_group [export_vars -base search {q search_package_id offset num __csrf_token}] } else { set url_next_group "" } if { $current_result_page > 0 } { set offset [expr {($current_result_page - 1) * $limit}] - set url_previous [export_vars -base search {{q $urlencoded_query} search_package_id offset num __csrf_token}] + set url_previous [export_vars -base search {q search_package_id offset num __csrf_token}] } else { set url_previous "" } if { $current_result_page < $last_result_page } { set offset [expr {$current_result_page * $limit + $limit}] - set url_next [export_vars -base search {{q $urlencoded_query} search_package_id offset num __csrf_token}] + set url_next [export_vars -base search {q search_package_id offset num __csrf_token}] } else { set url_next "" } template::multirow create results_paginator item link current_p for { set __i $from_result_page } { $__i <= $to_result_page} { incr __i } { - set link [export_vars -base search {{q $urlencoded_query} search_package_id __csrf_token}] - append link "&offset=[expr {$__i * $limit}]" - append link "&num=$num" + set offset [expr {$__i * $limit}] + set link [export_vars -base search {q search_package_id offset num __csrf_token}] template::multirow append results_paginator [expr {$__i + 1}] $link [expr {$__i == $current_result_page}] } Index: openacs-4/packages/search/lib/navbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/lib/navbar.tcl,v diff -u -r1.5.2.2 -r1.5.2.3 --- openacs-4/packages/search/lib/navbar.tcl 12 Sep 2015 19:00:45 -0000 1.5.2.2 +++ openacs-4/packages/search/lib/navbar.tcl 18 Oct 2016 10:29:34 -0000 1.5.2.3 @@ -12,39 +12,41 @@ set first_page_in_group [expr { $current_page_group * $pages_per_group }] set last_page_in_group [expr { ($current_page_group + 1) * $pages_per_group - 1 }] +security::csrf::new +if {[info exists ::__csrf_token]} {set __csrf_token $::__csrf_token} + if { $current_page_group >= 1 } { set offset [expr {($current_page_group - 1) * $pages_per_group * $limit}] - set url_previous_group [export_vars -base search {{q $urlencoded_query} search_package_id offset num}] + set url_previous_group [export_vars -base search {q search_package_id offset num __csrf_token}] } else { set url_previous_group "" } if { $current_page_group < $last_page_group } { set offset [expr {($current_page_group + 1) * $pages_per_group * $limit}] - set url_next_group [export_vars -base search {{q $urlencoded_query} search_package_id offset num}] + set url_next_group [export_vars -base search {q search_package_id offset num __csrf_token}] } else { set url_next_group "" } if { $current_result_page > 0 } { set offset [expr {($current_result_page - 1) * $limit}] - set url_previous [export_vars -base search {{q $urlencoded_query} search_package_id offset num}] + set url_previous [export_vars -base search {q search_package_id offset num __csrf_token}] } else { set url_previous "" } if { $current_result_page < $last_result_page } { set offset [expr {$current_result_page * $limit + $limit}] - set url_next [export_vars -base search {{q $urlencoded_query} search_package_id offset num}] + set url_next [export_vars -base search {q search_package_id offset num __csrf_token}] } else { set url_next "" } template::multirow create results_paginator item link current_p for { set __i $from_result_page } { $__i <= $to_result_page} { incr __i } { - set link "search?q=${urlencoded_query}&search_package_id=$search_package_id" - append link "&offset=[expr {$__i * $limit}]" - append link "&num=$num" + set offset [expr {$__i * $limit}] + set link [export_vars -base search {q search_package_id offset num __csrf_token}] template::multirow append results_paginator [expr {$__i + 1}] $link [expr {$__i == $current_result_page}] } Index: openacs-4/packages/search/www/search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/www/search.adp,v diff -u -r1.18.2.3 -r1.18.2.4 --- openacs-4/packages/search/www/search.adp 5 Aug 2016 13:55:53 -0000 1.18.2.3 +++ openacs-4/packages/search/www/search.adp 18 Oct 2016 10:29:34 -0000 1.18.2.4 @@ -59,7 +59,7 @@ -