diff options
author | James Moger <james.moger@gitblit.com> | 2012-08-19 21:40:37 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-08-19 21:40:37 -0400 |
commit | 5930f37817148229d9bcc0b47206b620e999315e (patch) | |
tree | 2ff40541f9bb7b6f7ce93ef49fbbc72a2686a787 /src | |
parent | d1231c63669f4bc3643985b9032de7f998612e08 (diff) | |
download | gitblit-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.java | 12 |
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;
|