]> source.dussan.org Git - archiva.git/commitdiff
* Adding HEAD as ACCESS only method.
authorJoakim Erdfelt <joakime@apache.org>
Fri, 27 Oct 2006 20:02:35 +0000 (20:02 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Fri, 27 Oct 2006 20:02:35 +0000 (20:02 +0000)
* Removing full stacktrace on authz denied logging.
* Adding remote ip address on authz denied.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@468513 13f79535-47bb-0310-9956-ffa450edef68

archiva-webapp/src/main/java/org/apache/maven/archiva/web/servlet/repository/RepositoryAccess.java

index 5635183b7794ec54f7f7942dbb2f8bbb35ed2e64..a009662531561d84ff2a8977060d0659cb0a1877 100644 (file)
@@ -81,6 +81,7 @@ public class RepositoryAccess
     static
     {
         ACCESS_METHODS = new ArrayList();
+        ACCESS_METHODS.add( "HEAD" );
         ACCESS_METHODS.add( "GET" );
         ACCESS_METHODS.add( "PROPFIND" );
         ACCESS_METHODS.add( "OPTIONS" );
@@ -185,7 +186,9 @@ public class RepositoryAccess
             {
                 if ( authzResult.getException() != null )
                 {
-                    getLogger().warn( "Authorization Denied", authzResult.getException() );
+                    getLogger().warn( "Authorization Denied [ip=" + request.getRemoteAddr() + ",isWriteRequest="
+                                          + isWriteRequest + ",permission=" + permission + "] : "
+                                          + authzResult.getException().getMessage() );
                 }
                 
                 // Issue HTTP Challenge.