debian/0000755000000000000000000000000011657144674007205 5ustar debian/source/0000755000000000000000000000000011655561776010511 5ustar debian/source/format0000644000000000000000000000001411655561776011717 0ustar 3.0 (quilt) debian/source/lintian-overrides0000644000000000000000000000043111655561776014070 0ustar # Debian Perl Group policy is that the copyright format be kept at # this version until the standard is finalized. libcgi-application-plugin-linkintegrity-perl source: out-of-date-copyright-format-uri http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=135 debian/compat0000644000000000000000000000000211655561776010407 0ustar 8 debian/control0000644000000000000000000000255611656052050010601 0ustar Source: libcgi-application-plugin-linkintegrity-perl Section: perl Priority: optional Maintainer: Debian Perl Group Uploaders: Nicholas Bamber , Jaldhar H. Vyas Build-Depends: debhelper (>= 8) Build-Depends-Indep: perl, libcgi-application-perl, liburi-perl, libdigest-hmac-perl, libtest-pod-perl, libtest-pod-coverage-perl Standards-Version: 3.9.2 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libcgi-application-plugin-linkintegrity-perl.git Vcs-Git: git://git.debian.org/pkg-perl/packages/libcgi-application-plugin-linkintegrity-perl.git Homepage: http://search.cpan.org/dist/CGI-Application-Plugin-LinkIntegrity/ Package: libcgi-application-plugin-linkintegrity-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libcgi-application-perl, liburi-perl, libdigest-hmac-perl Breaks: libcgi-application-extra-plugin-bundle-perl (<< 0.5) Replaces: libcgi-application-extra-plugin-bundle-perl (<< 0.5) Enhances: libcgi-application-perl Description: plugin to make tamper-resisistent links in CGI::Application CGI::Application::Plugin::LinkIntegrity lets you create tamper-resistent links within your CGI::Application project. When you create an URL with link, a cryptographic checksum is added to the URL, so any attempt to change part of the URL will fail. debian/rules0000755000000000000000000000003611655561776010270 0ustar #!/usr/bin/make -f %: dh $@ debian/patches/0000755000000000000000000000000011655567655010642 5ustar debian/patches/digest-sha.patch0000644000000000000000000000400211655567327013703 0ustar Description: use Digest::SHA instead of SHA1 cf. http://wiki.debian.org/Teams/DebianPerlGroup/OpenTasks/Transitions/DigestSHA1ToDigestSHA Origin: vendor Forwarded: no Author: gregor herrmann Last-Update: 2011-08-14 --- a/README +++ b/README @@ -227,7 +227,7 @@ digest_module Which digest module to use to create the checksum. Typically, this - will be either "Digest::MD5" or "Digest::SHA1". However any module + will be either "Digest::MD5" or "Digest::SHA". However any module supported by "Digest::HMAC" will work. The default "digest_module" is "Digest::MD5". --- a/lib/CGI/Application/Plugin/LinkIntegrity.pm +++ b/lib/CGI/Application/Plugin/LinkIntegrity.pm @@ -276,7 +276,7 @@ =item digest_module Which digest module to use to create the checksum. Typically, this will -be either C or C. However any module +be either C or C. However any module supported by C will work. The default C is C. --- a/t/04-hmac.t +++ b/t/04-hmac.t @@ -165,23 +165,23 @@ # Same test but with SHA1 (if available) SKIP: { eval { - require Digest::SHA1; + require Digest::SHA; }; - skip 'Digest::SHA1 not installed', 3 if $@; + skip 'Digest::SHA not installed', 3 if $@; $secret = 'even secreter'; $self->link_integrity_config( 'secret' => $secret, - 'digest_module' => 'Digest::SHA1', + 'digest_module' => 'Digest::SHA', 'additional_data' => 'abcde', ); $uri = '/foo/bar/baz?one=foo&two=boom'; $link = $self->link($uri); - $hmac = Digest::HMAC->new($secret, 'Digest::SHA1'); + $hmac = Digest::HMAC->new($secret, 'Digest::SHA'); $u = URI->new($uri, 'http'); $hmac->add($u->scheme || ''); debian/patches/series0000644000000000000000000000005411655567374012054 0ustar stdin.patch spelling.patch digest-sha.patch debian/patches/spelling.patch0000644000000000000000000000121011655567101013454 0ustar Author: Nicholas Bamber Subject: Spelling Bug: http://rt.cpan.org/Ticket/Display.html?id=60920 Last-Update: 2011-11-07 --- a/lib/CGI/Application/Plugin/LinkIntegrity.pm +++ b/lib/CGI/Application/Plugin/LinkIntegrity.pm @@ -93,7 +93,7 @@ Note that in the parameters of the call to << link >>, items enclosed in quotes are treated as literal parameters and barewords are treated as template params. So C<'email'> is the literal string, and C is -the template paramter named email (in this case 'gordon@example.com'). +the template parameter named email (in this case 'gordon@example.com'). =head1 DESCRIPTION debian/patches/stdin.patch0000644000000000000000000000313011655561776012777 0ustar Author: Nicholas Bamber Subject: test script hangs waiting on STDIN Forwarded: not-needed Last-Update: 2011-11-06 --- a/t/02-self_link.t +++ b/t/02-self_link.t @@ -59,6 +59,9 @@ } } +local *STDIN; +open(STDIN, '<', '/dev/null'); + $ENV{'REQUEST_METHOD'} = 'POST'; $ENV{'SERVER_PORT'} = '80'; $ENV{'SCRIPT_NAME'} = '/cgi-bin/app.cgi'; --- a/t/03-path_info_link.t +++ b/t/03-path_info_link.t @@ -91,6 +91,9 @@ } } +local *STDIN; +open(STDIN, '<', '/dev/null'); + $ENV{'REQUEST_METHOD'} = 'POST'; $ENV{'SERVER_PORT'} = '80'; $ENV{'SCRIPT_NAME'} = '/cgi-bin/app.cgi'; --- a/t/05-tampering.t +++ b/t/05-tampering.t @@ -88,6 +88,9 @@ CGI::initialize_globals(); is(WebApp->new->run, 'rm=link_okay', "[$meth] entry_point (no params) link_okay"); +local *STDIN; +open(STDIN, '<', '/dev/null'); + $ENV{'REQUEST_METHOD'} = $meth = 'POST'; $ENV{'SERVER_PORT'} = $link->port; $ENV{'SCRIPT_NAME'} = $link->path; --- a/t/06-built_in_link_tampered_rm.t +++ b/t/06-built_in_link_tampered_rm.t @@ -65,6 +65,9 @@ } ########################################################################### +local *STDIN; +open(STDIN, '<', '/dev/null'); + # Build the link $ENV{'REQUEST_METHOD'} = 'POST'; $ENV{'SERVER_PORT'} = '80'; --- a/t/07-invalid_checksum_hook.t +++ b/t/07-invalid_checksum_hook.t @@ -68,6 +68,10 @@ } } ########################################################################### +local *STDIN; +open(STDIN, '<', '/dev/null'); + +$ENV{'REQUEST_METHOD'} = 'POST'; # Build the link $ENV{'REQUEST_METHOD'} = 'POST'; $ENV{'SERVER_PORT'} = '80'; debian/watch0000644000000000000000000000024511655561776010243 0ustar version=3 http://search.cpan.org/dist/CGI-Application-Plugin-LinkIntegrity/ .*/CGI-Application-Plugin-LinkIntegrity-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian/copyright0000644000000000000000000000217411655561776011150 0ustar Format-Specification: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=135 Maintainer: Michael Graham Source: http://search.cpan.org/dist/CGI-Application-Plugin-LinkIntegrity/ Name: CGI-Application-Plugin-LinkIntegrity Files: * Copyright: 2005, Michael Graham License: Artistic or GPL-1+ Files: debian/* Copyright: 2011, Nicholas Bamber License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/changelog0000644000000000000000000000036211657144552011053 0ustar libcgi-application-plugin-linkintegrity-perl (0.06-1) unstable; urgency=low * Split off from libcgi-application-extra-plugin-bundle-perl (Closes: #647862). -- Nicholas Bamber Fri, 11 Nov 2011 07:06:15 +0000