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

Annotation of /rpms/perl-CGI-FormMagick/sme8/perl-CGI-FormMagick-0.92-ip-validation.patch

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


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

1 snetram 1.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 snetram 1.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 snetram 1.1 return 'FM_IP_NUMBER1' unless $data =~ /^[\d.]+$/;
6    
7 snetram 1.2 my @octets = split /\./, $data;
8     + my $dots = ($data =~ tr/.//);
9 snetram 1.1
10     - return 'FM_IP_NUMBER2' unless scalar @octets == 4;
11 snetram 1.2 + return 'FM_IP_NUMBER2' unless (scalar @octets == 4 and $dots == 3);
12 snetram 1.1
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