Author: xor
Date: 2008-11-08 10:23:26 +0000 (Sat, 08 Nov 2008)
New Revision: 23413

Modified:
   trunk/plugins/Freetalk/Freetalk.java
Log:
Fix webinterface bug.

Modified: trunk/plugins/Freetalk/Freetalk.java
===================================================================
--- trunk/plugins/Freetalk/Freetalk.java        2008-11-08 09:15:19 UTC (rev 
23412)
+++ trunk/plugins/Freetalk/Freetalk.java        2008-11-08 10:23:26 UTC (rev 
23413)
@@ -171,8 +171,10 @@
        public String handleHTTPGet(HTTPRequest request) throws 
PluginHTTPException {

                String pass = request.getParam("formPassword");
-               if (pass == null || (pass.length() == 0) || 
!pass.equals(pr.getNode().clientCore.formPassword))
-                       return Errors.makeErrorPage(this, "Buh! Invalid form 
password");
+               if(pass != null) {      /* FIXME: is this correct? what if the 
client just does not specify the password so that its null? */
+                       if ((pass.length() == 0) || 
!pass.equals(pr.getNode().clientCore.formPassword))
+                               return Errors.makeErrorPage(this, "Buh! Invalid 
form password");
+               }

                String page = request.getPath().substring(PLUGIN_URI.length());
                if ((page.length() < 1) || ("/".equals(page)))


Reply via email to