This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
TitleNullPointerException while attaching file in un
Date01-May-2007 19:36:30 EEST
Version2.4.102
Submitter193.172.9.9
Bug criticalityBadBug
Browser versionFirefox 2.0.0.1
Bug statusNewBug
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

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 01-May-2007 20:09 by HarryMetske.