summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-08-19 21:40:37 -0400
committerJames Moger <james.moger@gitblit.com>2012-08-19 21:40:37 -0400
commit5930f37817148229d9bcc0b47206b620e999315e (patch)
tree2ff40541f9bb7b6f7ce93ef49fbbc72a2686a787 /src
parentd1231c63669f4bc3643985b9032de7f998612e08 (diff)
downloadgitblit-5930f37817148229d9bcc0b47206b620e999315e.tar.gz
gitblit-5930f37817148229d9bcc0b47206b620e999315e.zip
Fix for possible nullpointer reported in issue 123
Diffstat (limited to 'src')
-rw-r--r--src/com/gitblit/GitFilter.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/gitblit/GitFilter.java b/src/com/gitblit/GitFilter.java
index aa673462..8ce4d3a7 100644
--- a/src/com/gitblit/GitFilter.java
+++ b/src/com/gitblit/GitFilter.java
@@ -101,11 +101,13 @@ public class GitFilter extends AccessRestrictionFilter {
*/
@Override
protected boolean isActionAllowed(RepositoryModel repository, String action) {
- if (action.equals(gitReceivePack)) {
- // Push request
- if (!repository.isBare) {
- logger.warn("Gitblit does not allow pushes to repositories with a working copy");
- return false;
+ if (!StringUtils.isEmpty(action)) {
+ if (action.equals(gitReceivePack)) {
+ // Push request
+ if (!repository.isBare) {
+ logger.warn("Gitblit does not allow pushes to repositories with a working copy");
+ return false;
+ }
}
}
return true;