From: Ivan Kohler Date: Sat, 8 Dec 2012 19:07:04 +0000 (-0800) Subject: fix part_pkg.comment xss X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=786beb09ecbf02c572ca01c61353e163f0637dbd fix part_pkg.comment xss --- diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi index 1959302d2..7711dccf7 100755 --- a/httemplate/browse/agent_type.cgi +++ b/httemplate/browse/agent_type.cgi @@ -44,9 +44,9 @@ my $agent_type = shift; [ { #'data' => $part_pkg->pkg. ' - '. $part_pkg->comment, - 'data' => $type_pkgs->pkg. ' - '. + 'data' => encode_entities($type_pkgs->pkg). ' - '. ( $type_pkgs->custom ? '(CUSTOM) ' : '' ). - $type_pkgs->comment, + encode_entities($type_pkgs->comment), 'align' => 'left', 'link' => $p. 'edit/part_pkg.cgi?'. $type_pkgs->pkgpart, }, diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi index 8a6fbc255..b75757fb1 100755 --- a/httemplate/edit/agent_type.cgi +++ b/httemplate/edit/agent_type.cgi @@ -20,7 +20,7 @@ Select which packages agents of this type may sell to customers
'source_obj' => $agent_type, 'link_table' => 'type_pkgs', 'target_table' => 'part_pkg', - 'name_callback' => sub { $_[0]->pkg_comment(nopkgpart => 1); }, + 'name_callback' => sub { encode_entities( $_[0]->pkg_comment(nopkgpart => 1) ); }, 'target_link' => $p.'edit/part_pkg.cgi?', 'disable-able' => 1,