Project

General

Profile

Defect #5236 » Redmine.pm.patch

Anthony Paul, 2010-04-06 17:54

View differences:

Redmine.pm 2010-04-06 17:39:07.813256302 +0200
1 1
package Apache::Authn::Redmine;
2

  
2
 
3 3
=head1 Apache::Authn::Redmine
4 4

  
5 5
Redmine - a mod_perl module to authenticate webdav subversion users
......
105 105

  
106 106
use Apache2::Module;
107 107
use Apache2::Access;
108
use Apache2::Connection;
108 109
use Apache2::ServerRec qw();
109 110
use Apache2::RequestRec qw();
110 111
use Apache2::RequestUtil qw();
111
use Apache2::Const qw(:common :override :cmd_how);
112
use Apache2::Const qw(:common :override :cmd_how :remotehost);
112 113
use APR::Pool ();
113 114
use APR::Table ();
114 115

  
......
197 198
sub access_handler {
198 199
  my $r = shift;
199 200

  
201
  if ($r->connection->remote_ip  eq $r->connection->local_ip)
202
    { return OK; }
203

  
200 204
  unless ($r->some_auth_required) {
201 205
      $r->log_reason("No authentication has been configured");
202 206
      return FORBIDDEN;
......
216 220
sub authen_handler {
217 221
  my $r = shift;
218 222
  
223
  if ($r->connection->remote_ip  eq $r->connection->local_ip)
224
    { return OK; }
225

  
219 226
  my ($res, $redmine_pass) =  $r->get_basic_auth_pw();
220 227
  return $res unless $res == OK;
221 228
  
(1-1/2)