From 3d18177c158acc492e9322677b11c8089df0fbc0 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 11 Nov 2012 23:08:47 -0800 Subject: [PATCH] fix XSS --- httemplate/edit/cust_main/top_misc.html | 2 +- httemplate/elements/dashboard-toplist.html | 2 +- httemplate/elements/small_prospect_view.html | 2 +- httemplate/misc/cust_main_note-import.cgi | 12 ++++++------ httemplate/misc/did_order_provision.html | 2 +- httemplate/misc/xmlhttp-cust_main-duplicates.html | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html index 7ce283c6c..cfed8e4f6 100644 --- a/httemplate/edit/cust_main/top_misc.html +++ b/httemplate/edit/cust_main/top_misc.html @@ -114,7 +114,7 @@ <% mt('Referring customer') |h %> - <% $cust_main->referral_custnum %>: <% $referring_cust_main->name %> + <% $cust_main->referral_custnum %>: <% $referring_cust_main->name |h %> diff --git a/httemplate/elements/dashboard-toplist.html b/httemplate/elements/dashboard-toplist.html index c6362e0c9..f4a372519 100644 --- a/httemplate/elements/dashboard-toplist.html +++ b/httemplate/elements/dashboard-toplist.html @@ -21,7 +21,7 @@ - <% $cust_main->name %> + <% $cust_main->name |h %> <& /elements/mcp_lint.html, 'cust_main'=>$cust_main &> diff --git a/httemplate/elements/small_prospect_view.html b/httemplate/elements/small_prospect_view.html index 4942e8dc7..26e830bc4 100644 --- a/httemplate/elements/small_prospect_view.html +++ b/httemplate/elements/small_prospect_view.html @@ -1,5 +1,5 @@ % my $link = "${p}view/prospect_main.html?". $prospect_main->prospectnum; -Prospect: <% $prospect_main->name %> +Prospect: <% $prospect_main->name |h %> <%init> my($prospect_main, %opt) = @_; diff --git a/httemplate/misc/cust_main_note-import.cgi b/httemplate/misc/cust_main_note-import.cgi index 72ac556fd..186289517 100644 --- a/httemplate/misc/cust_main_note-import.cgi +++ b/httemplate/misc/cust_main_note-import.cgi @@ -164,7 +164,7 @@ % my $i=0; % foreach (@cust_main) { - + % $i++; % } @@ -172,15 +172,15 @@ var customer_select<% $row %> = document.getElementById("cust_select<% $row %>"); customer_select<% $row %>.onchange = select_customer; - + - <% $first %> - + <% $first |h %> + - <% $last %> - + <% $last |h %> + <% $note %> diff --git a/httemplate/misc/did_order_provision.html b/httemplate/misc/did_order_provision.html index 1df9444ab..8739c1619 100644 --- a/httemplate/misc/did_order_provision.html +++ b/httemplate/misc/did_order_provision.html @@ -21,7 +21,7 @@ % my $avail = keys(%$cust_pkg_phone); % $anyavail = 1 if $avail; - <% $cust_main->name %> + <% $cust_main->name |h %> % if ( !$avail ) { No suitable packages exist for this customer. diff --git a/httemplate/misc/xmlhttp-cust_main-duplicates.html b/httemplate/misc/xmlhttp-cust_main-duplicates.html index 6654b3e39..7ee00af66 100644 --- a/httemplate/misc/xmlhttp-cust_main-duplicates.html +++ b/httemplate/misc/xmlhttp-cust_main-duplicates.html @@ -8,9 +8,9 @@ Choose an existing customer <% $custnum %>: - <% $_->name %>—<%$_->ucfirst_cust_status%>
-<% $_->address1 %>
-<% $_->city %>, <% $_->state %>  <% $_->zip %> + <% $_->name |h %>—<%$_->ucfirst_cust_status%>
+<% $_->address1 |h %>
+<% $_->city |h %>, <% $_->state %>  <% $_->zip %> -- 2.11.0