/[smeserver]/rpms/e-smith-hosts/sme8/e-smith-hosts-2.2.0-fix-comment.patch
ViewVC logotype

Annotation of /rpms/e-smith-hosts/sme8/e-smith-hosts-2.2.0-fix-comment.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Nov 29 17:35:51 2010 UTC (13 years, 11 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-hosts-2_2_0-13_el5_sme, e-smith-hosts-2_2_0-10_el5_sme, e-smith-hosts-2_2_0-9_el5_sme, e-smith-hosts-2_2_0-12_el5_sme, e-smith-hosts-2_2_0-11_el5_sme, e-smith-hosts-2_2_0-8_el5_sme, HEAD
* Mon Nov 29 2010 Shad L. Lords <slords@mail.com> 2.2.0-8.sme
- Sanitize comment field in tables and edit form [SME: 6408]

1 slords 1.1 diff -up e-smith-hosts-2.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm.fix-comment e-smith-hosts-2.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm
2     --- e-smith-hosts-2.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm.fix-comment 2010-11-29 10:15:23.000000000 -0700
3     +++ e-smith-hosts-2.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm 2010-11-29 10:17:04.000000000 -0700
4     @@ -33,6 +33,7 @@ use File::Basename;
5     use Exporter;
6     use Carp;
7     use Net::IPv4Addr;
8     +use HTML::Entities;
9    
10     our @ISA = qw(esmith::FormMagick Exporter);
11    
12     @@ -245,7 +246,7 @@ sub print_host_row
13     $self->print_td($self->localise($host_record->prop('HostType')) || "&nbsp;");
14     $self->print_td($ip);
15     $self->print_td($host_record->prop('MACAddress') || "&nbsp;");
16     - $self->print_td($host_record->prop('Comment') || "&nbsp;");
17     + $self->print_td(HTML::Entities::encode($host_record->prop('Comment')) || "&nbsp;");
18     my $static = $host_record->prop('static') || "no";
19     if ($static ne 'yes') {
20     my $propstring = $self->build_host_cgi_params($host_record->key(), $host_record->props());
21     @@ -289,7 +290,7 @@ sub build_host_cgi_params {
22     global_ip => $oldprops{ExternalIP},
23     ethernet_address => $oldprops{MACAddress},
24     hosttype => $oldprops{HostType},
25     - comment => $oldprops{Comment},
26     + comment => HTML::Entities::encode($oldprops{Comment}),
27     );
28    
29     return $self->props_to_query_string(\%props);
30     @@ -498,7 +499,7 @@ sub print_confirmation_details {
31     next unless $val;
32     my $label = $label_map{$f} || uc($f);
33     print $q->Tr (esmith::cgi::genSmallCell($q, $self->localise($label),"normal"),
34     - esmith::cgi::genSmallCell($q, $val,"normal"));
35     + esmith::cgi::genSmallCell($q, HTML::Entities::encode($val),"normal"));
36     }
37    
38     print qq(</table>);

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed