Title | Add attachment fails with container authentication |
Date | 16-Feb-2007 13:27:12 EET |
Version | 2.4.91 |
Submitter | Rajiv |
Bug criticality | BadBug |
Browser version | Firefox 2 |
Bug status | ClosedBug |
PageProvider used | |
Servlet Container | Pramati Server |
Operating System | Windows XP Pro |
URL | |
Java version | 1.5.0_06 |
Deploy JSPWIki-2.4.91 with the property "jspwiki.security" set to "container". Uncommented the web.xml snippets to create two resource collections for admin and for editing.
All the operations work fine as expected. However, adding an attachment fails with an NPE in com.ecyrd.jspwiki.auth.AuthorizationManager.java line 160.
It appears that the AttachmentServlet checks for AllPermission. getActions of AllPermission returns null which triggers the NPE.
The line needs to be changed from:
if( permission == null || permission.getActions().equals("login") )to:
if( permission == null || "login".equals(permission.getActions()))
Just checked the 2.5.33 source, it's not implemented yet (line 171 meanwhile).
Waiting for fix implementation
Fixed in 2.5.40
Add new attachment
Only authorized users are allowed to upload new attachments.