Activator
view release on metacpan or search on metacpan
'Test::Pod' => 0,
'Class::StrongSingleton' => 0,
'Hash::Merge' => 0,
'Time::HiRes' => 0,
'Exception::Class::TryCatch' => 0,
'Exception::Class::DBI' => 0,
'Email::Send' => 0,
'MIME::Lite' => 0,
'HTML::Entities' => 0,
'Digest::SHA1' => 0,
'Crypt::CBC' => 0,
'MIME::Base64' => 0,
'CGI::Cookie' => 0,
'YAML::Syck' => 0,
'Template' => 0,
'Template::Plugin::HTML::Strip' => 0,
},
);
$build->create_build_script;
Object Oriented framework to ease
creation and rapid development of multi-developer distributed mixed
environment perl based software projects, especially Catalyst based
websites.
license: perl
resources:
license: http://dev.perl.org/licenses/
requires:
CGI::Cookie: 0
Class::StrongSingleton: 0
Crypt::CBC: 0
Data::Dumper: 0
Digest::SHA1: 0
Email::Send: 0
Exception::Class: 0
Exception::Class::DBI: 0
Exception::Class::TryCatch: 0
HTML::Entities: 0
Hash::Merge: 0
IO::Capture: 0
Log::Log4perl: 0
Test::Pod
Test::Harness
Class::StrongSingleton
Hash::Merge
Time::HiRes
Exception::Class::TryCatch
Exception::Class::DBI
Email::Send
MIME::Lite
Digest::SHA1
Crypt::CBC
MIME::Base64
CGI::Cookie
YAML::Syck
See `perldoc Activator` for more information.
COPYRIGHT AND LICENCE
---------------------
Copyright (c) 2007 Karim A. Nassar <karim.nassar@acm.org>
lib/Activator.pm view on Meta::CPAN
Scalar::Util
IO::Capture
Exception::Class
Test::Exception
Test::Pod
Class::StrongSingleton
Hash::Merge
Time::HiRes
Exception::Class::TryCatch
Exception::Class::DBI
Crypt::CBC
Crypt::Blowfish
MIME::Lite
HTML::Entities
Email::Send
Template::Plugin::HTML::Strip
On a CentOS system, this should get you going with Catalyst:
yum install perl-Catalyst-Runtime \
perl-Class-Accessor \
lib/Activator.pm view on Meta::CPAN
#yum install \
perl-Data-Dumper \
perl-Scalar-Util \
perl-IO-Capture \
perl-Exception-Class \
perl-Test-Exception \
perl-Test-Pod \
perl-Hash-Merge \
perl-Time-HiRes \
perl-Exception-Class-DBI \
perl-Crypt-CBC \
perl-Crypt-Blowfish \
perl-MIME-Lite \
perl-HTML-Entities \
perl-Template-Plugin-HTML-Strip \
python-crypto python-paramiko memcached
cd /root/downloads/activator-rpms && rpm -Hiv \
lib/Catalyst/Plugin/SecureCookies.pm view on Meta::CPAN
package Catalyst::Plugin::SecureCookies;
use strict;
use CGI::Cookie;
use Symbol;
use Class::Accessor::Fast;
use Digest::SHA1;
use Crypt::CBC;
use MIME::Base64;
our $VERSION = 0.01;
our $CIPHER;
=head1 NAME
Catalyst::Plugin::SecureCookies - Tamper-resistant, encrypted HTTP Cookies
=head1 SYNOPSIS
lib/Catalyst/Plugin/SecureCookies.pm view on Meta::CPAN
When HTTP cookies are used to store a user's state or identity it's
important that your application is able to distinguish legitimate
cookies from those that have been edited or created by a malicious
user.
This module creates a pair of cookies which encrypt a form so the
user cannot modify cookie contents.
=head2 Implementation
SecureCookies is implemented using Crypt::CBC and MIME::Base64
to encrypt and encode a urlencoded string representing a perl
hash. The encoded string is then hashed using Digest::SHA1 to
prepare a sort of "checksum" or hash to make sure the user did
not modify the cookie.
=head1 CONFIGURATION
=over 4
=item key
MyApp->config->{SecureCookies}->{key} = $secret_key;
This parameter is B<required>, and sets the secret key that is used to
encrypt the cookies with Crypt::CBC Blowfish. This needs to be a
16 hex character string.
=item ssl
MyApp->config->{SecureCookies}->{ssl} = 0;
# or
MyApp->config->{SecureCookies}->{ssl} = 1;
This parameter is optional, and will default to C<1> if not set.
lib/Catalyst/Plugin/SecureCookies.pm view on Meta::CPAN
## convert from web friendlies
$mimed =~ tr/[\_\-.]/[\+\/\=]/;
return decode_base64( $mimed );
}
sub _get_cipher {
my $key = shift;
if ( !$CIPHER ) {
$CIPHER = new Crypt::CBC( -key => pack("H16", $key),
-cipher => 'Blowfish' );
}
return $CIPHER;
}
sub _url_encode_hashref {
my ($form_hashref) = @_;
## bail if it's not a form
if( !defined($form_hashref) ) { return ''; }
lib/Catalyst/Plugin/SecureCookies.pm view on Meta::CPAN
$string =~ s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord($1))/eg;
$string =~ s/ /\+/g;
return $string;
}
=back
=head1 SEE ALSO
L<Catalyst>, L<Digest::SHA1>, L<Crypt::CBC>, L<MIME::Base64>
L<http://www.schneier.com/blog/archives/2005/08/new_cryptanalyt.html>
=head1 AUTHOR
Rob Johnson L<rob@giant-rock.com>
=head1 ACKNOWLEDGEMENTS
* Karim A. Nassar for converting this into a self-contained Catalyst Plugin.
( run in 0.917 second using v1.01-cache-2.11-cpan-df04353d9ac )