User: starksm
Date: 01/06/28 13:55:54
Modified: src/main/org/jboss/security/plugins JaasSecurityManager.java
Log:
Allow for a null credential in validateCache as can be the case of an
unauthenticated user being allowed access. In this case the subjectCredential
must also be null.
Revision Changes Path
1.8 +10 -1
jbosssx/src/main/org/jboss/security/plugins/JaasSecurityManager.java
Index: JaasSecurityManager.java
===================================================================
RCS file:
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/plugins/JaasSecurityManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- JaasSecurityManager.java 2001/06/15 08:26:02 1.7
+++ JaasSecurityManager.java 2001/06/28 20:55:54 1.8
@@ -51,7 +51,7 @@
@author <a href="[EMAIL PROTECTED]">Oleg Nitz</a>
@author [EMAIL PROTECTED]
-@version $Revision: 1.7 $
+@version $Revision: 1.8 $
*/
public class JaasSecurityManager implements SubjectSecurityManager, RealmMapping
{
@@ -359,6 +359,15 @@
{
Object subjectCredential = info.credential;
boolean isValid = false;
+ // Check for a null credential as can be the case for an anonymou user
+ if( credential == null )
+ {
+ // Subject credential must also be null
+ isValid = subjectCredential == null;
+ }
+ if( isValid == true )
+ return true;
+
if( subjectCredential.getClass().isAssignableFrom(credential.getClass()) ==
false )
return false;
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development