You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/04/08 20:15:56 UTC

DO NOT REPLY [Bug 49075] New: protected Class User doesn't check argument roles for null

https://issues.apache.org/bugzilla/show_bug.cgi?id=49075

           Summary: protected Class User doesn't check argument roles for
                    null
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: felix.schumacher@internetallee.de


Created an attachment (id=25246)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25246)
check for null to guard Collections.unmodifiableList

If roles is null, Collections.unmodifiableList will throw a NPE.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49075] protected Class User doesn't check argument roles for null

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49075

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Mark Thomas <ma...@apache.org> 2010-04-09 11:17:15 UTC ---
This has been fixed in trunk with an alternative patch that fixes both issues

Many thanks for the analysis, report and proposed patch.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49075] protected Class User doesn't check argument roles for null

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49075

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25246|0                           |1
        is obsolete|                            |

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> 2010-04-08 18:36:06 UTC ---
Created an attachment (id=25247)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25247)
null-pointer guard for User and make unmodifiable list modifiable

Since User#roles is unmodifiable, a UnsupportedOperationException will be
thrown in JNDIRealm#getRoles(DirContext, User). A second patch will create a
new ArrayList from User#roles to allow getRoles to modify it.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org