view release on metacpan or search on metacpan
AuthenNTLM.pm view on Meta::CPAN
};
}
$self -> {smbhandle} = Authen::Smb::Valid_User_Connect ($pdc, $bdc, $domain, $nonce) ;
print STDERR "[$$] AuthenNTLM: verify handle $self->{username} smbhandle == $self->{smbhandle} \n" if ($debug) ;
if (!$self -> {smbhandle})
{
MP2 ? $r->log_error("Connect to SMB Server failed (pdc = $pdc bdc = $bdc domain = $domain error = "
. Authen::Smb::SMBlib_errno . '/' . Authen::Smb::SMBlib_SMB_Error . ") for " .
AuthenNTLM.pm view on Meta::CPAN
return $self -> {nonce} = $nonce ;
}
sub verify_user
{
my ($self, $r) = @_ ;
if (!$self -> {smbhandle})
AuthenNTLM.pm view on Meta::CPAN
my $header1 = $self -> set_msg2 ($r, $nonce) ;
my $hdr = $r -> err_headers_out ;
$hdr -> add ($r->proxyreq ? 'Proxy-Authenticate' : 'WWW-Authenticate', $header1) if ($self -> {authntlm}) ;
# $r->discard_request_body ;
print STDERR "[$$] AuthenNTLM: verify handle = 1 smbhandle == $self->{smbhandle} \n" if ($debug) ;
return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED ;
}
elsif ($type == 3)
{
print STDERR "[$$] handler type == 3 \n" if ($debug) ;
print STDERR "[$$] AuthenNTLM: verify handle = 3 smbhandle == $self->{smbhandle} \n" if ($debug) ;
if ( !$self->verify_user( $r ) )
{
if ( $self->{ntlmauthoritative} )
{
my $hdr = $r -> err_headers_out ;
$hdr -> add ($r->proxyreq ? 'Proxy-Authenticate' : 'WWW-Authenticate', 'NTLM') if ($self -> {authntlm}) ;
AuthenNTLM.pm view on Meta::CPAN
$self -> {lock} = undef ; # reset lock in case anything has gone wrong
MP2 ? $r->log_error("Cannot get nonce for " . $r->uri) : $r->log_reason("Cannot get nonce for " . $r->uri) ;
return MP2 ? Apache::HTTP_INTERNAL_SERVER_ERROR : Apache::Constants::HTTP_INTERNAL_SERVER_ERROR ;
}
if (!$self -> verify_user ($r))
{
if ($self -> {basicauthoritative})
{
my $hdr = $r -> err_headers_out ;
$hdr -> add ($r->proxyreq ? 'Proxy-Authenticate' :'WWW-Authenticate', 'Basic realm="'
AuthenNTLM.pm view on Meta::CPAN
The NTLM protocol performs a challenge/response to exchange a random number
(nonce) and get back a md4 hash, which is built from the user's password
and the nonce. This makes sure that no password goes over the wire in plain text.
The main advantage of the Perl implementation is, that it can be easily extended
to verify the user/password against other sources than a windows domain controller.
The defaultf implementation is to go to the domain controller for the given domain
and verify the user. If you want to verify the user against another source, you
can inherit from Apache::AuthenNTLM and override it's methods.
To support users that aren't using Internet Explorer, Apache::AuthenNTLM can
also perform basic authentication depending on its configuration.
AuthenNTLM.pm view on Meta::CPAN
=head2 PerlSetVar ntlmauthoritative
Setting the ntlmauthoritative directive explicitly to 'off' allows authentication
to be passed on to lower level modules if AuthenNTLM cannot authenticate the user
and the NTLM authentication scheme is used.
If set to 'on', which is the default, AuthenNTLM will try to verify the user and,
if it fails, will give an Authorization Required reply.
=head2 PerlSetVar basicauthoritative
Setting the ntlmauthoritative directive explicitly to 'off' allows authentication
to be passed on to lower level modules if AuthenNTLM cannot authenticate the user
and the Basic authentication scheme is used.
If set to 'on', which is the default, AuthenNTLM will try to verify the user and
if it fails will give an Authorization Required reply.
=head2 PerlSetVar ntlmsemkey
There are troubles when two authentication requests take place at the same
AuthenNTLM.pm view on Meta::CPAN
Will be called to setup the connection to the windows domain controller
for $self -> {domain} and retrieve the nonce.
In case you do not authenticate against a windows machine, you simply need
to set $self -> {nonce} to a 8 byte random string. Returns undef on error.
=head2 $self -> verify_user ($r)
Should verify that the given user supplied the right credentials. Input:
=over
=item $self -> {basic}
view all matches for this distribution
view release on metacpan or search on metacpan
AuthenPasswd.pm view on Meta::CPAN
adaptation (i.e. I modified the code) of Michael Parker's
(B<parker@austx.tandem.com>) Apache::AuthenSmb module.
The module uses getpwnam to retrieve the B<passwd> entry from the
B</etc/passwd> file, using the supplied username as the search key. It
then uses B<crypt()> to verify that the supplied password matches the
retrieved hashed password.
= head2 Apache::AuthenPasswd vs. Apache::AuthzPasswd
I've taken "authentication" to be meaningful only in terms of a user and
view all matches for this distribution
view release on metacpan or search on metacpan
examples/filelogon view on Meta::CPAN
|| die "FAILURE: can't close password file '$passfile' because: $!\n";
if (!defined($password) || $password =~ m/^\s*$/) {
die "FAILURE: missing or empty password\n";
}
# ------ verify username/password
if ($username eq "fred" && $password eq "Scooby-Do!2002") {
print "OK: File login succeeded.\n";
} else {
print "FAILURE: bad username or password.\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
Auth/Auth.pm view on Meta::CPAN
=item *
AuthUserCookie
The name of the of cookie that contains the value of the persons username
in plain text. This is checked against the contents of the encrypted cookie
to verify user. The cookie is set of other applications can identify
authorized users. It defaults to F<SecurID_User> if this variable is not set.
=item *
AuthCookiePath
view all matches for this distribution
view release on metacpan or search on metacpan
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.38.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It would check each file's integrity, as well as the signature's
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Backend/POE.pm view on Meta::CPAN
) ? 1 : 0;
# print STDERR "$prefix need ping: ".($needping == 1 ? "yes" : "no")." \n" if $Apache::Backend::POE::DEBUG > 1;
$LastPingTime{$dsn} = $now;
# check first if there is already a object cached
# if this is the case, possibly verify the object
# using the ping-method. Use eval for checking the connection
# handle in order to avoid problems (dying inside ping) when
# handle is invalid.
# require Data::Dumper;
# print STDERR Data::Dumper->Dump([\%Connected]);
view all matches for this distribution
view release on metacpan or search on metacpan
newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL
*/
/* To verify whether ppport.h is needed for your module, and whether any
special defines should be used, ppport.h can be run through Perl to check
your source code. Simply say:
perl -x ppport.h *.c *.h *.xs foo/*.c [etc]
view all matches for this distribution
view release on metacpan or search on metacpan
$cache2->lock;
ok($cache2->status, SUCCESS);
my $now = time();
# trying to change the locked data, this will failed, but after 5 seconds
# we want to verify this
$cache1->set('foo', 'bar');
my $now2 = time();
ok($cache1->status, FAILURE);
ok($now2 - $now >= 5);
view all matches for this distribution
view release on metacpan or search on metacpan
t/httpd02.conf view on Meta::CPAN
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
t/httpd02.conf view on Meta::CPAN
#SSLCARevocationFile /etc/httpd/conf/ssl.crl/ca-bundle.crl
# Client Authentication (Type):
# Client certificate verification type and depth. Types are
# none, optional, require and optional_no_ca. Depth is a
# number which specifies how deeply to verify the certificate
# issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth 10
# Access Control:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/DBI.pm view on Meta::CPAN
) ? 1 : 0;
debug(2, "$prefix need ping: " . ($needping == 1 ? "yes" : "no"));
$LastPingTime{$dsn} = $now;
# check first if there is already a database-handle cached
# if this is the case, possibly verify the database-handle
# using the ping-method. Use eval for checking the connection
# handle in order to avoid problems (dying inside ping) when
# RaiseError being on and the handle is invalid.
if ($Connected{$Idx} and (!$needping or eval{$Connected{$Idx}->ping})) {
debug(2, "$prefix already connected to '$Idx'");
view all matches for this distribution
view release on metacpan or search on metacpan
FileManager.pm view on Meta::CPAN
if ($$o{DR} !~ /^$dr/) {
$$o{DR} = r->document_root;
r->log_error("Warning: Document root changed to $dr. Custom document root must lie inside of real document root.");
}
#verify current working directory
$_ = r->param('FILEMANAGER_curr_dir');
s/\.\.//g; s/^\///; s/\/$//;
my $curr_dir = $_;
#set current directory
view all matches for this distribution
view release on metacpan or search on metacpan
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.21.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It would check each file's integrity, as well as the signature's
view all matches for this distribution
view release on metacpan or search on metacpan
F<ppport.h> on your source code. See the next section for
details.
=head1 EXAMPLES
To verify whether F<ppport.h> is needed for your module, whether you
should make any changes to your code, and whether any special defines
should be used, F<ppport.h> can be run as a Perl script to check your
source code. Simply say:
perl ppport.h
view all matches for this distribution
view release on metacpan or search on metacpan
sub _redir_perm { $PARAMS{&REDIR_PERM} = ($_[2] =~ /^(1|true|on|yes)$/) }
sub _handler {
my $r = shift;
if ($r->is_initial_req) {
$r->verify_config;
for my $ignore (@{$PARAMS{&IGNORE_REGEX}}) {
if ($ignore->($r->uri)) {
$r->log->debug
(sprintf("Ignoring %s that matches ignore regex.", $r->uri));
return Apache::DECLINED;
sub _handler_2 : method {
my $r = bless { r => $_[1] }, $_[0];
return $r->_handler;
}
sub verify_config {
my $r = shift;
$PARAMS{&DEFAULT_LANG} ||= $r->dir_config->get(DEFAULT_LANG);
for my $bit (FORCE_LANG, REDIR_PERM) {
my $cfg = $r->dir_config->get($bit) || '';
$PARAMS{$bit} ||= scalar($cfg =~ /^(1|true|on|yes)$/i);
view all matches for this distribution
view release on metacpan or search on metacpan
t/Utility.t view on Meta::CPAN
# proper invocation
ok( $util->check_pidfile( "${rwtest}.pid", fatal => 0 ), 'check_pidfile')
or $log->error();
# verify the contents of the file contains our PID
my ($pid) = $util->file_read( "${rwtest}.pid", fatal => 0 );
ok( $PROCESS_ID == $pid, 'check_pidfile' );
# regext_test
ok( $util->regexp_test(
view all matches for this distribution
view release on metacpan or search on metacpan
INSTALLATION
1. Prequisites
This module requires Apache::MP3 2.12 or greater. Before you begin
installing this module, install and verify that Apache::MP3 works.
This module also requires HTML::Template 2.00 or greater. Both Apache::MP3
and HTML::Template are available on CPAN.
2. Download and Install Apache::MP3::Skin
If you are already running Apache::MP3, and you should be, then inside
your httpd.conf or access.conf file, change the handler for your songs
directory from Apache::MP3 (or Apache::MP3::Playlist or something
similar) to Apache::MP3::Skin. At this point, without going any further
in the installation process, Apache::MP3::Skin will act just as
Apache::MP3::Playlist. If you want you can restart Apache and verify
that that's true.
You should have something like this in httpd.conf or access.conf
view all matches for this distribution
view release on metacpan or search on metacpan
## MessageFile appears to be missing, pass onto next phase
return OK unless $file;
return OK unless -e $file;
## Look for cookie ($cn) and verify it's value
my $cookies = Apache::Cookie->new($r)->parse;
if (my $c = $cookies->{$cn}) {
my $cv = $c->value;
return OK if ($ct_request == 0 && $cv eq '1');
displayMotd($r);
view all matches for this distribution
view release on metacpan or search on metacpan
eg/Model/MyPageKit/Common.pm view on Meta::CPAN
my ($login, $epasswd) = $dbh->selectrow_array($sql_str,{},$user_id);
return unless $login;
# create a new hash and verify that it matches the supplied hash
# (prevents tampering with the cookie)
no strict 'refs';
my $newhash = Digest::MD5::md5_hex(join ':', ${ __PACKAGE__ . '::secret_md5' }, $user_id, crypt($epasswd,"pk"));
use strict 'refs';
view all matches for this distribution
view release on metacpan or search on metacpan
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.61.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
view all matches for this distribution
view release on metacpan or search on metacpan
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.55.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
view all matches for this distribution
view release on metacpan or search on metacpan
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.55.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Reload.pm view on Meta::CPAN
Even though F<My/Utils.pm> was reloaded, C<ModPerl::Registry>'s cached
code won't run 'C<use My::Utils;>' again (since it happens only once,
i.e. during the compile time). Therefore the script doesn't know that
the subroutine reference has been changed.
This is easy to verify. Let's change the script to be:
#file:test.pl
#------------
use My::Utils;
print "Content-type: text/plain\n\n";
view all matches for this distribution
view release on metacpan or search on metacpan
RequestNotes.pm view on Meta::CPAN
MaxPostSize applies to file uploads as well as POST data, so if you
plan on uploading files bigger than 1K, you will need to the override
the default value.
$Apache::RequestNotes:err is set if libapreq reports a problem
parsing the form data, thus it can be used to verify whether $input
and $uploads contain valid objects. Apache::RequestNotes will _not_
return SERVER_ERROR in the event libapreq encounters an error. This
may change in future releases.
Verbose debugging is enabled by setting the variable
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
$order = $k if ($k > $order);
}
return $order;
}
sub verify_x12 {
my $s = shift;
my $vendor = shift;
my $dataref = shift;
# all we do here right now is make sure our header envelope matches who we think
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
$s->{orderby} = $s->{in}{orderby} || $args{$k};
}
}
}
sub verify_date {
=head2 verify_date
my $truefalse = $s->verify_date($date,$mindays,$maxdays);
Make sure a date is in a given range of days from today.
=cut
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
v => [ $date ]);
return $ok;
}
sub verify_zipcode {
=head2 verify_zipcode
my $truefalse = $s->verify_zipcode(\$zip,[\$state],[\$city],[\$country]);
Check the zipcode database for the given zipcode. If optional references
are included in call and zipcode is valid, these scalar references are
populated with the database information.
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
} else {
return 0;
}
}
sub verify_email {
=head2 verify_email
my $truefalse = $s->verify_email($email);
=cut
my $s = shift;
my $ref = shift;
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
} else {
return 0;
}
}
sub verify_regex {
=head2 verify_regex
my $truefalse = $s->verify_regex($regex);
=cut
my $s = shift;
my $regex = shift;
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
} else {
return 1;
}
}
sub verify_phone {
=head2 verify_phone
my $truefalse = $s->verify_phone(\$number,[\$other]);
Checks that $number is only numbers and it 10 digits. Changes
input scalar reference to clean it up. If $other scalar reference
is provided, and nothing is in $number, then function returns true
which is somewhat of a bypass for non 10 digit phone verification.
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
$s->{in}{$ref->{k}} = 0;
}
$hash{$kname} = $s->{in}{$kname};
if ($ref->{verify} eq "zipcode" && $hash{$kname}) {
unless($s->verify_zipcode(\$hash{$kname},\$state,\$city)) {
croak "$hash{$kname} is not a valid zipcode";
}
}
if ($ref->{verify} eq 'regex' && $hash{$kname}) {
unless($s->verify_regex($hash{$kname})) {
croak "$hash{$kname} is not a valid regular expression";
}
}
if ($ref->{verify} eq "phone" && $hash{$kname}) {
unless($s->verify_phone(\$hash{$kname})) {
croak "$hash{$kname} is not a valid phone number";
}
}
if ($ref->{verify} eq "email" && $hash{$kname}) {
unless($s->verify_email(\$hash{$kname})) {
croak "$hash{$kname} is not a valid email";
}
}
}
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
foreach my $k (keys %import) {
$import{$k} =~ s/(\s+|,)$//; # strip trailing spaces and other crap like commas
$import{$k} =~ s/^\s+//; # strip leading
}
# verify....
foreach my $f (@{$s->{o}{fields}}) {
if ($import{$f->{k}} && $f->{verify}) {
if ($f->{verify} eq 'phone') {
unless($s->verify_phone(\$import{$f->{k}})) {
$import{$f->{k}} = '';
}
} elsif ($f->{verify} eq 'email') {
unless($s->verify_email(\$import{$f->{k}})) {
$import{$f->{k}} = '';
}
} elsif ($f->{verify} eq 'zipcode') {
unless($s->verify_zipcode(\$import{$f->{k}},\$import{state},\$import{city})) {
$import{$f->{k}} = '';
$import{state} = '';
$import{city} = '';
}
}
lib/Apache/SdnFw/lib/Core.pm view on Meta::CPAN
sub _authenticate {
my $s = shift;
if ($s->{in}{forgot_email}) {
if ($s->verify_email(\$s->{in}{forgot_email})) {
my %employee = $s->db_q("
SELECT *
FROM employees
WHERE email=?
",'hash',
view all matches for this distribution
view release on metacpan or search on metacpan
## don't perform in subrequests
unless ($r->is_initial_req) { return OK; }
$log->debug(ref($self), "->issue():");
$resp = $self->verifyIdentity($r);
if (ref($resp)) {
if ($msg = $resp->{message}) { $log->info($msg); }
if ($resp->{fill_form}) { return OK; }
if ($resp->{auth_required}) { return AUTH_REQUIRED; }
unless ($resp->{uri}) { return SERVER_ERROR; }
$r->header_out(Location => $resp->{uri});
return REDIRECT;
}
## make sure request is consistent and comes from an administrator
$resp = $self->verifyAdminRequest($r);
unless (ref($resp)) { $log->error($resp); return SERVER_ERROR; }
if ($msg = $resp->{message}) { $log->info($msg); }
if ($resp->{forbidden}) { return FORBIDDEN; } # non-admin
if ($resp->{fill_form}) { return OK; }
unless ($uid = $resp->{newuid}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Browseable/Store/LDAP.pm view on Meta::CPAN
# Connect
my $ldap = Net::LDAP->new(
\@servers,
onerror => undef,
verify => $self->{args}->{ldapVerify} || "require",
( $caFile ? ( cafile => $caFile ) : () ),
( $caPath ? ( capath => $caPath ) : () ),
(
$self->{args}->{ldapRaw} ? ( raw => $self->{args}->{ldapRaw} )
lib/Apache/Session/Browseable/Store/LDAP.pm view on Meta::CPAN
}
# Start TLS if needed
if ($useTls) {
my %h = split( /[&=]/, $tlsParam );
$h{verify} ||= ( $self->{args}->{ldapVerify} || "require" );
$h{cafile} ||= $caFile if ($caFile);
$h{capath} ||= $caPath if ($caPath);
my $start_tls = $ldap->start_tls(%h);
if ( $start_tls->code ) {
$self->logError($start_tls);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Counted.pm view on Meta::CPAN
followed by an underscore. And finally a session-ID like the one in
Apache::Session. The number part is used as an identifier of the
session and the ID part is used as a password. The number part is
easily predictable, but the second part is reasonable unpredictable.
We use the first part for implementation details like storage on the
disk and the second part to verify the ownership of that token.
=head1 PREREQUISITES
Apache::Session::Counted needs Apache::Session and File::CounterFile,
all available from the CPAN. The HostID and HostURL parameters for a
view all matches for this distribution
view release on metacpan or search on metacpan
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.93.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
# Connect
my $ldap = Net::LDAP->new(
\@servers,
onerror => undef,
verify => $self->{args}->{ldapVerify} || "require",
( $caFile ? ( cafile => $caFile ) : () ),
( $caPath ? ( capath => $caPath ) : () ),
(
$self->{args}->{ldapPort}
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
}
# Start TLS if needed
if ($useTls) {
my %h = split( /[&=]/, $tlsParam );
$h{verify} ||= ( $self->{args}->{ldapVerify} || "require" );
$h{cafile} ||= $caFile if ($caFile);
$h{capath} ||= $caPath if ($caPath);
my $start_tls = $ldap->start_tls(%h);
if ( $start_tls->code ) {
$self->logError($start_tls);
view all matches for this distribution
view release on metacpan or search on metacpan
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.88.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
view all matches for this distribution