From f4b1e7abd6c061a8652de1679db43544134f7a72 Mon Sep 17 00:00:00 2001 From: bohung Date: Tue, 1 Nov 2022 21:05:27 +0800 Subject: [PATCH] Fix vulnerable. --- .../_application_form_signup_dashboard.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/application_forms/_application_form_signup_dashboard.html.erb b/app/views/admin/application_forms/_application_form_signup_dashboard.html.erb index 34515a6..4c37d70 100644 --- a/app/views/admin/application_forms/_application_form_signup_dashboard.html.erb +++ b/app/views/admin/application_forms/_application_form_signup_dashboard.html.erb @@ -29,7 +29,7 @@ content_tag :div, paginate(@application_form_signups), class: "pagination pagination-centered" end %> - <%= pagination_html.gsub(/page_no#{count}=\d*/,"").gsub('&&','&').gsub(/page=(\d*)/m){|ff| ff.gsub("page=#{$1}","page=#{params[:page]}&page_no#{count}=#{$1}")}.html_safe %> + <%= pagination_html.gsub(/page_no#{count}=\d*/,"").gsub('&&','&').gsub(/page=(\d*)/m){|ff| ff.gsub("page=#{$1}","page=#{(params[:page] ? params[:page].to_s.to_i : nil)}&page_no#{count}=#{$1}")}.html_safe %> <% end %> <% if count != 2 && @application_form.application_form_reviews.count >= 2 %>