/[smeserver]/rpms/e-smith-hosts/sme7/e-smith-hosts-2.0.0-fix-comment.patch
ViewVC logotype

Annotation of /rpms/e-smith-hosts/sme7/e-smith-hosts-2.0.0-fix-comment.patch

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


Revision 1.1 - (hide annotations) (download)
Thu Mar 10 22:42:05 2011 UTC (13 years, 8 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-hosts-2_0_0-3_el4_sme, HEAD
- Sanitize comment field in tables and edit form [SME: 6409]

1 wellsi 1.1 diff -ruN e-smith-hosts-2.0.0.old/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm e-smith-hosts-2.0.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm
2     --- e-smith-hosts-2.0.0.old/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm 2008-10-07 18:35:49.000000000 +0100
3     +++ e-smith-hosts-2.0.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm 2011-03-10 22:05:37.000000000 +0000
4     @@ -33,6 +33,7 @@
5     use Exporter;
6     use Carp;
7     use Net::IPv4Addr;
8     +use HTML::Entities;
9    
10     our @ISA = qw(esmith::FormMagick Exporter);
11    
12     @@ -202,7 +203,7 @@
13     $self->print_td($self->localise($host_record->prop('HostType')) || " ");
14     $self->print_td($ip);
15     $self->print_td($host_record->prop('MACAddress') || " ");
16     - $self->print_td($host_record->prop('Comment') || " ");
17     + $self->print_td(HTML::Entities::encode($host_record->prop('Comment')) || " ");
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     @@ -246,7 +247,7 @@
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     @@ -455,7 +456,7 @@
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