TitleNullPointerException while attaching file in un
Date01-May-2007 19:36:30 EEST
Bug criticalityBadBug
Browser versionFirefox
Bug statusClosedBug
PageProvider usedFileSystemProvider
Servlet ContainerTomcat 5.5.20
Operating SystemLinux kernel 2.6.20
URLattach file to any topic
Java versionSun JDK 1.5.0_11

I run an open wiki for personal use, so I disabled security (jspwiki.security=off in jspwiki.properties).

Trying to attach a file causes a NullPointerException in AuthorizationManager.checkPermission(WikiSession,Permission), because AllPermissions.getActions() returns null:

if (permission == null ||(permission.getActions().equals("login")))
   return false;
I flipped the .equals:
if (permission == null || ("login".equals(permission.getActions())))
I think this maintains the correct behaviour in secured wiki's, and fixes the bug in non-secured wiki's.

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:32 by HarryMetske