]> source.dussan.org Git - gitblit.git/commitdiff
Fix for possible nullpointer reported in issue 123
authorJames Moger <james.moger@gitblit.com>
Mon, 20 Aug 2012 01:40:37 +0000 (21:40 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 20 Aug 2012 01:40:37 +0000 (21:40 -0400)
src/com/gitblit/GitFilter.java

index aa673462bc2d2dc2e30a355c12b7e491d34ab3d3..8ce4d3a7ce444a675e45879df2afa8de79c7d61a 100644 (file)
@@ -101,11 +101,13 @@ public class GitFilter extends AccessRestrictionFilter {
         */\r
        @Override\r
        protected boolean isActionAllowed(RepositoryModel repository, String action) {\r
-               if (action.equals(gitReceivePack)) {\r
-                       // Push request\r
-                       if (!repository.isBare) {\r
-                               logger.warn("Gitblit does not allow pushes to repositories with a working copy");\r
-                               return false;\r
+               if (!StringUtils.isEmpty(action)) {\r
+                       if (action.equals(gitReceivePack)) {\r
+                               // Push request\r
+                               if (!repository.isBare) {\r
+                                       logger.warn("Gitblit does not allow pushes to repositories with a working copy");\r
+                                       return false;\r
+                               }\r
                        }\r
                }\r
                return true;\r