TitleAdd attachment fails with container authentication
Date16-Feb-2007 13:27:12 EET
Bug criticalityBadBug
Browser versionFirefox 2
Bug statusClosedBug
PageProvider used
Servlet ContainerPramati Server
Operating SystemWindows XP Pro
Java version1.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") )
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.
« This page (revision-3) was last changed on 13-May-2007 15:33 by HarryMetske