[java-support] branch master updated: Was allowing a null return value instead of a dummy denial rule.
Scott Cantor
cantor.2 at osu.edu
Wed Oct 24 13:15:07 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=d9c83663c127d066eeac1403e277c704ed66dd8a
The following commit(s) were added to refs/heads/master by this push:
new d9c8366 Was allowing a null return value instead of a dummy denial rule.
d9c8366 is described below
commit d9c83663c127d066eeac1403e277c704ed66dd8a
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Oct 24 13:15:05 2018 -0400
Was allowing a null return value instead of a dummy denial rule.
---
.../support/security/DelegatingAccessControlService.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/security/DelegatingAccessControlService.java b/src/main/java/net/shibboleth/utilities/java/support/security/DelegatingAccessControlService.java
index 3781b20..126bf2d 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/security/DelegatingAccessControlService.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/security/DelegatingAccessControlService.java
@@ -18,6 +18,8 @@
package net.shibboleth.utilities.java.support.security;
import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import javax.servlet.ServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -54,7 +56,7 @@ public class DelegatingAccessControlService extends AbstractIdentifiableInitiali
/** {@inheritDoc} */
@Override
- public AccessControl getInstance(@Nonnull final String name) {
+ @Nonnull public AccessControl getInstance(@Nonnull final String name) {
ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
ServiceableComponent<AccessControlService> component = null;
try {
@@ -71,7 +73,13 @@ public class DelegatingAccessControlService extends AbstractIdentifiableInitiali
component.unpinComponent();
}
}
- return null;
+
+ return new AccessControl() {
+ public boolean checkAccess(@Nonnull final ServletRequest request, @Nullable final String operation,
+ @Nullable final String resource) {
+ return false;
+ }
+ };
}
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list