/[smeserver]/rpms/perl-CGI-FormMagick/sme7/perl-CGI-FormMagick-0.92-ip-validation.patch
ViewVC logotype

Contents of /rpms/perl-CGI-FormMagick/sme7/perl-CGI-FormMagick-0.92-ip-validation.patch

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


Revision 1.2 - (show annotations) (download)
Sat Mar 5 08:24:25 2011 UTC (13 years, 8 months ago) by snetram
Branch: MAIN
CVS Tags: perl-CGI-FormMagick-0_92-19_el4_sme, HEAD
Changes since 1.1: +6 -7 lines
* Sat Mar 5 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 0.92-19
- Fix IP address validation [SME: 3388]

1 diff -up perl-CGI-FormMagick-0.92/lib/CGI/FormMagick/Validator/Network.pm.ip-validation perl-CGI-FormMagick-0.92/lib/CGI/FormMagick/Validator/Network.pm
2 --- perl-CGI-FormMagick-0.92/lib/CGI/FormMagick/Validator/Network.pm.ip-validation 2011-03-05 08:27:07.000000000 +0100
3 +++ perl-CGI-FormMagick-0.92/lib/CGI/FormMagick/Validator/Network.pm 2011-03-05 08:29:20.000000000 +0100
4 @@ -147,8 +147,9 @@ sub ip_number {
5 return 'FM_IP_NUMBER1' unless $data =~ /^[\d.]+$/;
6
7 my @octets = split /\./, $data;
8 + my $dots = ($data =~ tr/.//);
9
10 - return 'FM_IP_NUMBER2' unless scalar @octets == 4;
11 + return 'FM_IP_NUMBER2' unless (scalar @octets == 4 and $dots == 3);
12
13 foreach my $octet (@octets) {
14 return $fm->localise("FM_IP_NUMBER3", {octet => $octet}) if $octet > 255;

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