/[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.1 - (hide annotations) (download)
Wed Mar 2 20:44:52 2011 UTC (13 years, 9 months ago) by snetram
Branch: MAIN
CVS Tags: perl-CGI-FormMagick-0_92-19_el5_sme, perl-CGI-FormMagick-0_92-20_el5_sme
* Wed Mar 2 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 0.92-19
- 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     --- perl-CGI-FormMagick-0.92/lib/CGI/FormMagick/Validator/Network.pm.ip-validation 2011-03-02 21:26:43.000000000 +0100
3     +++ perl-CGI-FormMagick-0.92/lib/CGI/FormMagick/Validator/Network.pm 2011-03-02 21:28:51.000000000 +0100
4     @@ -146,9 +146,9 @@ sub ip_number {
5    
6     return 'FM_IP_NUMBER1' unless $data =~ /^[\d.]+$/;
7    
8     - my @octets = split /\./, $data;
9     + my @dots = ($data =~ tr/.//);
10    
11     - return 'FM_IP_NUMBER2' unless scalar @octets == 4;
12     + return 'FM_IP_NUMBER2' unless scalar @dots == 3;
13    
14     foreach my $octet (@octets) {
15     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