/[smecontribs]/rpms/smeserver-gitweb/contribs8/smeserver-gitweb-1.1.0-remove_runtime_access_to_networks_db.patch
ViewVC logotype

Diff of /rpms/smeserver-gitweb/contribs8/smeserver-gitweb-1.1.0-remove_runtime_access_to_networks_db.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by unnilennium, Fri Jun 10 07:19:52 2016 UTC Revision 1.2 by unnilennium, Fri Jun 10 15:25:57 2016 UTC
# Line 111  diff -urN smeserver-gitweb-1.1.0.org/roo Line 111  diff -urN smeserver-gitweb-1.1.0.org/roo
111       # Check if the REMOTE_ADDR is within the range of the 'private' address for this server       # Check if the REMOTE_ADDR is within the range of the 'private' address for this server
112       my $remote_addr = NetAddr::IP->new( $ENV\{'REMOTE_ADDR'\} );       my $remote_addr = NetAddr::IP->new( $ENV\{'REMOTE_ADDR'\} );
113       if( $remote_addr->within( new NetAddr::IP @network_setting[1], @network_setting[2] ) ) \{       if( $remote_addr->within( new NetAddr::IP @network_setting[1], @network_setting[2] ) ) \{
 @@ -105,18 +102,18 @@  
   
      # For the remaining access from the internet, we need an authorised user  
      # that is allowed to either pull or push this repository.  
 -      
 +  
      # Check if we have:  
      # a) a user that is listed in the repository pull or push permissions  
      # b) valid credentials i.e password can be validated.  
      if( $ENV\{'HTTP_AUTHORIZATION'\} ) \{  
        my @http_authorisation = split(/ /, $ENV\{'HTTP_AUTHORIZATION'\} );  
        my @http_digest = split( /:/, decode_base64( @http_authorisation[1] ) );  
 -        
 +  
        # See who the effective users are for this repository. The AccountsDB needs  
        # to have world read permissions to allow this to work.  
 -      my $effective_pull_users = $git_db->effective_users_list_from( $properties\{'pull_groups'\},    
 -                                                                     $properties\{'pull_users'\} );  
 +      my $effective_pull_users = $git_db->effective_users_list_from( $properties\{'pull_groups'\},  
 +                                                                     $properties\{'pull_users'\} );  
        if( @http_digest[0] ~~ $effective_pull_users ) \{  
          # USER IN AUTHORISED LIST -> CHECK PASSWORD  
          if( trypass( @http_digest[0], @http_digest[1] ) == 0 ) \{  
114  @@ -131,7 +128,7 @@  @@ -131,7 +128,7 @@
115         return 0; # EXIT NO AUTHORISATION SUPPLIED -> DENY REPOSITORY VIEW         return 0; # EXIT NO AUTHORISATION SUPPLIED -> DENY REPOSITORY VIEW
116       \}       \}


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed