view release on metacpan or search on metacpan
lib/Apache/Session/Memcached.pm view on Meta::CPAN
sub populate {
my $self = shift;
$self->{object_store} = Apache::Session::Store::Memcached->new($self);
$self->{lock_manager} = Apache::Session::Lock::Null->new($self);
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Serialize::Storable::serialize;
$self->{unserialize} = \&Apache::Session::Serialize::Storable::unserialize;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Memorycached.pm view on Meta::CPAN
my $self = shift;
$self->{object_store} = new Apache::Session::Store::Memorycached $self;
$self->{lock_manager} = new Apache::Session::Lock::Memorycached $self;
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Memorycached::none;
$self->{unserialize} = \&Apache::Session::Memorycached::none;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/MongoDB.pm view on Meta::CPAN
my $self = shift;
$self->{object_store} = Apache::Session::Store::MongoDB->new($self);
$self->{lock_manager} = Apache::Session::Lock::Null->new($self);
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Serialize::MongoDB::serialize;
$self->{unserialize} = \&Apache::Session::Serialize::MongoDB::unserialize;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/NoSQL.pm view on Meta::CPAN
my $self = shift;
$self->{object_store} = new Apache::Session::Store::NoSQL $self;
$self->{lock_manager} = new Apache::Session::Lock::Null $self;
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Serialize::Base64::serialize;
$self->{unserialize} = \&Apache::Session::Serialize::Base64::unserialize;
#$self->{serialize} = \&Apache::Session::Serialize::Storable::serialize;
#$self->{unserialize} = \&Apache::Session::Serialize::Storable::unserialize;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/PHP.pm view on Meta::CPAN
my $self = shift;
$self->{object_store} = Apache::Session::Store::PHP->new($self);
$self->{lock_manager} = Apache::Session::Lock::Null->new($self);
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Serialize::PHP::serialize;
$self->{unserialize} = \&Apache::Session::Serialize::PHP::unserialize;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/SQLite.pm view on Meta::CPAN
my $self = shift;
$self->{object_store} = Apache::Session::Store::MySQL->new($self);
$self->{lock_manager} = Apache::Session::Lock::Null->new($self);
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Serialize::Base64::serialize;
$self->{unserialize} = \&Apache::Session::Serialize::Base64::unserialize;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/SQLite3.pm view on Meta::CPAN
my $self = shift;
$self->{object_store} = Apache::Session::Store::SQLite3->new($self);
$self->{lock_manager} = Apache::Session::Lock::Null->new($self);
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Serialize::Storable::serialize;
$self->{unserialize} = \&Apache::Session::Serialize::Storable::unserialize;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/SharedMem.pm view on Meta::CPAN
$self->{object_store} = new Apache::Session::Store::SharedMem $self;
$self->{lock_manager} = new Apache::Session::Lock::Null $self;
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Serialize::Storable::serialize;
$self->{unserialize} = \&Apache::Session::Serialize::Storable::unserialize;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
{ description => 'An invalid parameter or set of parameters was given',
alias => 'param_error' },
);
use Params::Validate 0.70;
use Params::Validate qw( validate SCALAR UNDEF BOOLEAN ARRAYREF OBJECT );
Params::Validate::validation_options( on_fail => sub { param_error( join '', @_ ) } );
use Scalar::Util ();
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
return $string;
}
sub RegisterClass {
my $class = shift;
my %p = validate( @_, { name => { type => SCALAR },
required => { type => SCALAR | ARRAYREF, default => [ [ ] ] },
optional => { type => SCALAR | ARRAYREF, default => [ ] },
},
);
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
$class->_SetValidParams();
}
sub RegisterFlexClass {
my $class = shift;
my %p = validate( @_, { type => { type => SCALAR,
regex => qr/^(?:store|lock|generate|serialize)/,
},
name => { type => SCALAR },
required => { type => SCALAR | ARRAYREF, default => [ [ ] ] },
optional => { type => SCALAR | ARRAYREF, default => [ ] },
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
}
sub session
{
my $self = shift;
my %p = validate( @_,
{ session_id =>
{ type => SCALAR,
optional => 1,
},
} );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/libmemcached.pm view on Meta::CPAN
my ($self) = @_;
$self->{object_store} = Apache::Session::Store::libmemcached->new($self);
$self->{lock_manager} = Apache::Session::Lock::Null->new($self);
$self->{generate} = \&Apache::Session::Generate::MD5::generate;
$self->{validate} = \&Apache::Session::Generate::MD5::validate;
$self->{serialize} = \&Apache::Session::Serialize::Storable::serialize;
$self->{unserialize} = \&Apache::Session::Serialize::Storable::unserialize;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
SessionX.pm view on Meta::CPAN
if (defined $session_id && $session_id)
{
#check the session ID for remote exploitation attempts
#this will die() on suspicious session IDs.
#eval { &{$self->{validate}}($self); } ;
&{$self->{validate}}($self);
#if (!$@)
{ # session id is ok
$self->{status} &= ($self->{status} ^ NEW);
SessionX.pm view on Meta::CPAN
return new {$self -> {'args'}{'lock_manager'}} $self;
}
#
# Default validate for Apache::Session < 1.53
#
sub validate {
#This routine checks to ensure that the session ID is in the form
#we expect. This must be called before we start diddling around
#in the database or the disk.
my $session = shift;
SessionX.pm view on Meta::CPAN
$self->{object_store} = new $store $self if ($store) ;
$self->{lock_manager} = new $lock $self if ($lock);
$self->{generate} = \&{$gen . '::generate'} if ($gen);
$self->{'validate'} = \&{$gen . '::validate'} if ($gen && defined (&{$gen . '::validate'}));
$self->{serialize} = \&{$ser . '::serialize'} if ($ser);
$self->{unserialize} = \&{$ser . '::unserialize'} if ($ser) ;
if (!defined ($self->{'validate'}))
{
$self->{'validate'} = \&validate ;
}
$self->{populated} = 1 ;
}
else
{ # recreate only store & lock classes as far as necessary
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SiteControl/User.pm view on Meta::CPAN
my $r = shift;
if(!defined($this) || !defined($r)) {
croak "INVALID CALL TO LOGOUT. You forgot to use OO syntax, or you forgot to pass the request object.";
}
eval("$this->{manager}" . '->invalidate($r, $this)');
if($@) {
$r->log_error("Logout failed: $@");
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TS/AdminClient.pm view on Meta::CPAN
proxy.config.http.cache.required_headers
proxy.config.http.cache.vary_default_images
proxy.config.http.cache.vary_default_other
proxy.config.http.cache.vary_default_text
proxy.config.http.cache.when_to_add_no_cache_to_msie_requests
proxy.config.http.cache.when_to_revalidate
proxy.config.http.chunking_enabled
proxy.config.http.congestion_control.default.client_wait_interval
proxy.config.http.congestion_control.default.congestion_scheme
proxy.config.http.congestion_control.default.dead_os_conn_retries
proxy.config.http.congestion_control.default.dead_os_conn_timeout
view all matches for this distribution
view release on metacpan or search on metacpan
Template.xs view on Meta::CPAN
create_srv_config_sv, /* server config creator */
perl_perl_merge_srv_config, /* server config merger */
mod_cmds, /* command table */
NULL, /* [7] list of handlers */
NULL, /* [2] filename-to-URI translation */
NULL, /* [5] check/validate user_id */
NULL, /* [6] check user_id is valid *here* */
NULL, /* [4] check access by host address */
NULL, /* [7] MIME type checker/setter */
NULL, /* [8] fixups */
NULL, /* [10] logger */
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TestConfig.pm view on Meta::CPAN
-e $vars->{t_conf_file} &&
-M $exe < -M $vars->{t_conf_file};
# any .in files are newer than their derived versions?
if (my @files = $self->extra_conf_files_needing_update) {
# invalidate the vhosts cache, since a different port could be
# assigned on reparse
$self->{vhosts} = {};
for my $file (@files) {
push @reasons, "$file.in is newer than $file";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Voodoo.pm view on Meta::CPAN
# If we got here we were sucessful
return 1;
}
# Function: validate_date
# Purpose: Check to make sure a date follows the MM/DD/YYYY format and checks the sanity of the numbers passed in
sub validate_date {
my $self = shift;
my $date = shift;
my $check_future = shift;
#Number of days in each month
view all matches for this distribution
view release on metacpan or search on metacpan
conf/server.xml.PL view on Meta::CPAN
SessionManager unless it is overridden. Note that the SessionManager
is not persistent and that a different session will be used for each
Application (single signon is not supported).
The maxInactiveInterval attribute specifies the number of seconds
after which an idle session is timed out (invalidated).
The cacheClass attribute specifies the name of the Cache::Cache implementation
class to use for the session cache.
-->
<SessionManager maxInactiveInterval="300"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/FormValidator.pm view on Meta::CPAN
#
# FormValidator.pm - Object that validates form input data.
#
# This file is part of FormValidator.
#
# Author: Francis J. Lacoste <francis.lacoste@iNsu.COM>
#
lib/HTML/FormValidator.pm view on Meta::CPAN
In an HTML::Empberl page:
use HTML::FormValidator;
my $validator = new HTML::FormValidator( "/home/user/input_profiles.pl" );
my ( $valid, $missing, $invalid, $unknown ) = $validator->validate( \%fdat, "customer_infos" );
=head1 DESCRIPTION
HTML::FormValidator's main aim is to make the tedious coding of input
validation expressible in a simple format and to let the programmer focus
on more interesting task.
When you are coding web application one of the most tedious though
crucial task is to validate user's input (usually submitted by way of
an HTML form). You have to check that each required fields is present
and that some feed have valid data. (Does the phone input looks like a
phone number ? Is that a plausible email address ? Is the YY state
valid ? etc.) For simple form, this is not really a problem but as
forms get more complex and you code more of them this task became
really boring and tedious.
HTML::FormValidator lets you defines profiles which defines the
required fields and their format. When you are ready to validate the
user's input, you tell HTML::FormValidator the profile to apply to the
user data and you get the valid fields, the name of the fields which
are missing, the name of the fields that contains invalid input and
the name of the fields that are unknown to this profile.
lib/HTML/FormValidator.pm view on Meta::CPAN
will be used to check wheter or not the field contains valid data.
Constraint can be either the name of a builtin constraint function
(see below), a perl regexp or an anonymous subroutine which will check
the input and return true or false depending on the input's validity.
The constraint function takes one parameter, the input to be validated
and returns true or false. It is possible to specify the parameters
that will be passed to the subroutine. For that use an hash reference
which contains in the I<constraint> element, the anonymous subroutine
or the name of the builtin and in the I<params> element the name of
the fields to pass a parameter to the function. (Don't forget to
lib/HTML/FormValidator.pm view on Meta::CPAN
=pod
=head1 VALIDATING INPUT
my( $valids, $missings, $invalids, $unknowns ) =
$validator->validate( \%fdat, "customer_infos" );
To validate input you use the validate() method. This method takes two
parameters :
=over
=item data
Contains an hash which should correspond to the form input as
submitted by the user. This hash is not modified by the call to validate.
=item profile
Can be either a name which will be used to lookup the corresponding profile
in the input profiles specification, or it can be an hash reference to the
lib/HTML/FormValidator.pm view on Meta::CPAN
=back
=cut
sub validate {
my ( $self, $data, $name ) = @_;
my $profile;
if ( ref $name ) {
$profile = $name;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/API.pm view on Meta::CPAN
$self->response->headers->set( 'Access-Control-Allow-Origin' => '*' );
}
# As an api, make sure there is no caching by default unless the field has already been set.
unless( $self->response->headers->get( 'Cache-Control' ) )
{
$self->response->headers->set( 'Cache-Control' => 'private, no-cache, no-store, must-revalidate' );
}
$self->response->content_type( 'application/json' );
# $r->status( $code );
$self->response->code( $code );
if( defined( $msg ) && $self->apache_request->content_type ne 'application/json' )
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/ASP/FormHandler.pm view on Meta::CPAN
use vars __PACKAGE__->VARS;
sub run {
my ($s, $context) = @_;
if( my $errors = $s->validate( $context ) ) {
$Session->{validation_errors} = $errors;
$Session->{__lastArgs} = $Form;
return $Response->Redirect( $ENV{HTTP_REFERER} );
}
lib/Apache2/ASP/FormHandler.pm view on Meta::CPAN
# Finally:
return $Response->Redirect( "/some/other/place.asp" );
}
sub validate {
my ($s, $context) = @_;
my $errors = { };
# Did they fill out the form?
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCAS.pm view on Meta::CPAN
"PGT" => "CAS Proxy Service Error",
"PGT_RECEPTOR" => "Proxy Receptor Error",
"INVALID_RESPONSE" => "Invalid Service Response",
"INVALID_PGT" => "Invalid Proxy Granting Ticket",
"MISSING_PGT" => "Missing Proxy Granting Ticket",
"CAS_CONNECT" => "CAS couldn't validate service ticket",
);
my %DEFAULTS = (
"Host" => "localhost",
"Port" => "443",
lib/Apache2/AuthCAS.pm view on Meta::CPAN
}
# No session (or an expired one). Check for a ticket
if (my $ticket = $params{'ticket'})
{
# validate service ticket through CAS, since no valid cookie was found
my($error, $user, $pgtiou) = $self->validate_service_ticket($ticket);
if ($error)
{
return $self->redirect($self->casConfig("ErrorUrl"), $error);
}
lib/Apache2/AuthCAS.pm view on Meta::CPAN
}
}
# params
# apache request object
# ticket to be validated
# returns a hash with keys on success
# 'user', 'pgtiou'
# NULL on failure
sub validate_service_ticket($$$)
{
my($self, $ticket) = @_;
my $proxy = $self->casConfig("ProxyService") ? "1" : "0";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCASpbh.pm view on Meta::CPAN
application directly accesses the unparsed URI it will still see the value.
=item C<AuthCAS_RequestPGT>
Whether or not to request a proxy granting ticket when a client service ticket
is validated; by default disabled.
=item C<AuthCAS_ServerURL>
The URL value to access the CAS authentication server; by default
"http://localhost/cas". For example:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
is generated by taking into account the provided username, authorization time
and a hash generated by including a specific logic plus the user's IP address.
Upon completion the session data is encrypted with the secret key (MyAuth_SecretKey)
and the according cookie is generated by Apache2::AuthCookie.
All the following requests to the protected resource take the cookie (if exists)
and the encrypted session key is validated (decrypted, the user is checked,
the session time is checked for expiration and the hash is regenerated
and compared with the provided one).
Upon success the user is authorized to access the protected resource.
Should you require any additional information how the cookies logic works
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
Please follow to Apache2::AuthCookie if you need more information about the method.
=head2 authen_ses_key($r, $session_key)
This is the overridden method of Apache::AuthCookie and is used to
validate the provided $session_key.
Returns the authenticated username in case of success or redirects to the login page otherwise.
Please follow to Apache2::AuthCookie if you need more information about the method.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthNSympa.pm view on Meta::CPAN
Because it's difficult to have an up to date authentication backend, this module aims to authenticate against Sympa mailing lists server.
Sympa mailing lists server has got its own authentication system and can be queried over a SOAP interface.
It is based on a basic HTTP authentication (popup on client side). Once the user has authenticated, the REMOTE_USER environnement var contains the user email address. The authentication module implements a SOAP client that validates user credentials ...
Sample httpd.conf example:
<Directory "/var/www/somwehere">
AuthName SympaAuth
AuthType Basic
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthenNTLM/Cookie.pm view on Meta::CPAN
my $result;
# get the cookie
my $jar = Apache2::Cookie::Jar->new($r);
my $cookie = $jar->cookies($self->{cookie_name});
my $has_valid_cookie = $cookie && $self->validate_cookie($cookie->value);
# if cookie is present and valid
if ($has_valid_cookie) {
$result = Apache2::Const::OK;
lib/Apache2/AuthenNTLM/Cookie.pm view on Meta::CPAN
$result = Apache2::Const::HTTP_UNAUTHORIZED;
}
# else invoke Apache2::AuthenNTLM to go through the NTLM handshake
else {
my $msg = $cookie ? "cookie invalidated" : "no cookie";
$r->log->debug("AuthenNTLM::Cookie: $msg, calling Apache2::AuthenNTLM");
$result = Apache2::AuthenNTLM->handler($r); # will set $r->user
# create the cookie if NTLM succeeded
$self->set_cookie if $result == Apache2::Const::OK;
lib/Apache2/AuthenNTLM/Cookie.pm view on Meta::CPAN
return $result;
}
sub validate_cookie {
my ($self, $cookie_val) = @_;
# unpack cookie information
my ($sha, $time_created, $username) = unpack COOKIE_FORMAT, $cookie_val;
lib/Apache2/AuthenNTLM/Cookie.pm view on Meta::CPAN
secret.
The default value for the secret is the concatenation of modification
time and inode of the F<httpd.conf> file on the server; therefore if
the configuration file changes, authentication cookies are
automatically invalidated.
=back
=head1 SPECIAL NOTE ABOUT INTERNET EXPLORER
view all matches for this distribution
view release on metacpan or search on metacpan
t/tests/40validxml.t view on Meta::CPAN
my $validator;
if (eval { $validator = new XML::Validate(Type => 'BestAvailable'); }) {
my $url = '/test/';
my $data = GET_BODY $url;
my $error = '';
unless ($validator->validate($data)) {
my $message = $validator->last_error()->{message} || '';
my $line = $validator->last_error()->{line} || '';
my $column = $validator->last_error()->{column} || '';
$error = "Error: $message at line $line, column $column";
}
view all matches for this distribution
view release on metacpan or search on metacpan
utilize|||
uvchr_to_utf8_flags||5.007003|
uvchr_to_utf8|||
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vdie_common|||
view all matches for this distribution
view release on metacpan or search on metacpan
t/manip/in_append.t view on Meta::CPAN
plan tests => 6 * $times;
## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate() for 1..$non_keep_alive_times;
## try keepalive conns
Apache::TestRequest::user_agent(reset => 1, keep_alive => 1);
validate() for 1..$keep_alive_times;
## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate();
# 6 sub-tests
sub validate {
my $key = "Leech";
my $val = "Hungry";
{
my $res = HEAD $location;
view all matches for this distribution
view release on metacpan or search on metacpan
utilize|||
uvchr_to_utf8_flags||5.007003|
uvchr_to_utf8|||
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vdie_common|||
view all matches for this distribution