aboutsummaryrefslogtreecommitdiff
path: root/security/p5-Authen-Captcha
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-01-11 13:29:13 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-01-11 13:29:13 +0000
commitdb89e3c9adb725144035109f16b437d240b791c9 (patch)
tree15ca6ebbf085a1e79f58950cdc43636afbd5c756 /security/p5-Authen-Captcha
parent58feff40dee2c3f881323d91fd08d9ba90444e95 (diff)
downloadports-db89e3c9adb725144035109f16b437d240b791c9.tar.gz
ports-db89e3c9adb725144035109f16b437d240b791c9.zip
- Update to 1.024
- Add LICENSE - Sort PLIST Changes: http://search.cpan.org/dist/Authen-Captcha/Changes
Notes
Notes: svn path=/head/; revision=376752
Diffstat (limited to 'security/p5-Authen-Captcha')
-rw-r--r--security/p5-Authen-Captcha/Makefile5
-rw-r--r--security/p5-Authen-Captcha/distinfo4
-rw-r--r--security/p5-Authen-Captcha/files/patch-Captcha.pm88
-rw-r--r--security/p5-Authen-Captcha/pkg-plist2
4 files changed, 6 insertions, 93 deletions
diff --git a/security/p5-Authen-Captcha/Makefile b/security/p5-Authen-Captcha/Makefile
index 7542e04e5340..b8572acd5103 100644
--- a/security/p5-Authen-Captcha/Makefile
+++ b/security/p5-Authen-Captcha/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= Authen-Captcha
-PORTVERSION= 1.023
-PORTREVISION= 9
+PORTVERSION= 1.024
CATEGORIES= security perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
@@ -11,6 +10,8 @@ PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= Perl module to verify the human element in transactions
+LICENSE= GPLv2
+
BUILD_DEPENDS= p5-GD>=0:${PORTSDIR}/graphics/p5-GD
RUN_DEPENDS:= ${BUILD_DEPENDS}
diff --git a/security/p5-Authen-Captcha/distinfo b/security/p5-Authen-Captcha/distinfo
index 97826f82b26f..bb0bbd9b5452 100644
--- a/security/p5-Authen-Captcha/distinfo
+++ b/security/p5-Authen-Captcha/distinfo
@@ -1,2 +1,2 @@
-SHA256 (Authen-Captcha-1.023.tar.gz) = b0e991d803aa491b10cba18efe2864b720c25fd3d4916bc76905adfe24e10597
-SIZE (Authen-Captcha-1.023.tar.gz) = 98986
+SHA256 (Authen-Captcha-1.024.tar.gz) = 798cc6ad6a6afa53f792ca427a8e474a31f578ba60928e93d86bf0899b0fd739
+SIZE (Authen-Captcha-1.024.tar.gz) = 99816
diff --git a/security/p5-Authen-Captcha/files/patch-Captcha.pm b/security/p5-Authen-Captcha/files/patch-Captcha.pm
deleted file mode 100644
index f4ee557c350c..000000000000
--- a/security/p5-Authen-Captcha/files/patch-Captcha.pm
+++ /dev/null
@@ -1,88 +0,0 @@
---- Captcha.pm.orig 2003-12-18 13:44:34.000000000 +0900
-+++ Captcha.pm 2010-01-19 18:52:23.656183439 +0900
-@@ -65,6 +65,7 @@
- my $keep_failures = (defined($opts{keep_failures}) && $opts{keep_failures})
- ? 1 : 0;
- $self->keep_failures($keep_failures);
-+ $self->secret($opts{secret} || "");
-
- # create a random seed if perl version less than 5.004
- if ($] < 5.005)
-@@ -193,6 +194,18 @@
- }
- }
-
-+sub secret
-+{
-+ ref(my $self = shift) or croak "instance variable needed";
-+ if (@_)
-+ { # it's a setter
-+ $self->{_secret} = $_[0];
-+ return $self->{_secret};
-+ } else {
-+ return $self->{_secret};
-+ }
-+}
-+
-
- sub check_code
- {
-@@ -214,7 +227,7 @@
- # they could be confused with (o) and (l), so we swap them in
- $code =~ tr/01/ol/;
-
-- my $md5 = md5_hex($code);
-+ my $md5 = md5_hex($code . $self->secret);
-
- # pull in current database
- warn "Open File: $database_file\n" if($self->debug() >= 2);
-@@ -232,7 +245,7 @@
- foreach my $line (@data)
- {
- $line =~ s/\n//;
-- my ($data_time,$data_code) = split(/::/,$line);
-+ my ($data_time,$data_code) = $line =~ m/(^\d+)::([[:xdigit:]]{32})$/;
-
- my $png_file = File::Spec->catfile($self->output_folder(),$data_code . ".png");
- if ($data_code eq $crypt)
-@@ -351,7 +364,7 @@
- foreach my $line (@data)
- {
- $line =~ s/\n//;
-- my ($data_time,$data_code) = split(/::/,$line);
-+ my ($data_time,$data_code) = $line =~ m/(^\d+)::([[:xdigit:]]{32})$/;
- if ( (($current_time - $data_time) > ($self->expire())) ||
- ($data_code eq $md5) )
- { # remove expired captcha, or a dup
-@@ -490,7 +503,7 @@
- my $length = shift;
-
- my $code = $self->generate_random_string($length);
-- my $md5 = md5_hex($code);
-+ my $md5 = md5_hex($code . $self->secret);
-
- my ($captcha_data_ref,$output_filename);
- if ($self->type() eq 'image')
-@@ -625,6 +638,7 @@
- height => 35, # optional. default 35
- images_folder => '/some/folder', # optional. default to lib dir
- keep_failures => 0, # optional, defaults to 0(false)
-+ secret => "", # optional, defaults to ""
- debug => 0, # optional. default 0
-
- =back
-@@ -695,6 +709,14 @@
-
- Optional. Defaults to zero. This option controls whether or not the captcha will remain valid after a failed attempt. By default, we only allow one attempt to solve it. This greatly reduces the possibility that a bot could brute force a correct answer. Change it at your own risk.
-
-+=item C<$captcha-E<gt>secret( "SuperSecret" );>
-+
-+Optional. Defaults to an empty string. This option is meant to prevent
-+brute-force captcha circumvention by calculating md5 sum of multiple
-+valid codes and comparing them with the image file name. Obviously, the
-+secret should be the same for creating and checking the captcha. It is a
-+good idea to set it to something else than the default.
-+
- =item C<$captcha-E<gt>debug( [0|1|2] );>
-
- Optional.
diff --git a/security/p5-Authen-Captcha/pkg-plist b/security/p5-Authen-Captcha/pkg-plist
index 87d2b19d46f2..5e11056a7893 100644
--- a/security/p5-Authen-Captcha/pkg-plist
+++ b/security/p5-Authen-Captcha/pkg-plist
@@ -1,4 +1,3 @@
-%%PERL5_MAN3%%/Authen::Captcha.3.gz
%%SITE_PERL%%/Authen/Captcha.pm
%%SITE_PERL%%/Authen/Captcha/images/2.png
%%SITE_PERL%%/Authen/Captcha/images/3.png
@@ -40,3 +39,4 @@
%%SITE_PERL%%/Authen/Captcha/images/x.png
%%SITE_PERL%%/Authen/Captcha/images/y.png
%%SITE_PERL%%/Authen/Captcha/images/z.png
+%%PERL5_MAN3%%/Authen::Captcha.3.gz