Defect #5236 » Redmine.pm.patch
| Redmine.pm 2010-04-06 17:39:07.813256302 +0200 | ||
|---|---|---|
|
package Apache::Authn::Redmine;
|
||
|
|
||
|
=head1 Apache::Authn::Redmine
|
||
|
Redmine - a mod_perl module to authenticate webdav subversion users
|
||
| ... | ... | |
|
use Apache2::Module;
|
||
|
use Apache2::Access;
|
||
|
use Apache2::Connection;
|
||
|
use Apache2::ServerRec qw();
|
||
|
use Apache2::RequestRec qw();
|
||
|
use Apache2::RequestUtil qw();
|
||
|
use Apache2::Const qw(:common :override :cmd_how);
|
||
|
use Apache2::Const qw(:common :override :cmd_how :remotehost);
|
||
|
use APR::Pool ();
|
||
|
use APR::Table ();
|
||
| ... | ... | |
|
sub access_handler {
|
||
|
my $r = shift;
|
||
|
if ($r->connection->remote_ip eq $r->connection->local_ip)
|
||
|
{ return OK; }
|
||
|
unless ($r->some_auth_required) {
|
||
|
$r->log_reason("No authentication has been configured");
|
||
|
return FORBIDDEN;
|
||
| ... | ... | |
|
sub authen_handler {
|
||
|
my $r = shift;
|
||
|
|
||
|
if ($r->connection->remote_ip eq $r->connection->local_ip)
|
||
|
{ return OK; }
|
||
|
my ($res, $redmine_pass) = $r->get_basic_auth_pw();
|
||
|
return $res unless $res == OK;
|
||
|
|
||