powered by Jive Software

Openfire AD Password doesnt like "&" (check would be nice!)

Hi,

just discovered something that might be absolutely logical for Javas out there but was a **** in the *** to find out at least for me, so I hope it might help you in future, as I couldn’t find an existing topic for this (if its there please apologize and delete this one).

If you use a password that contains an ampersand ("&") for the master-jabber-user thats fine for AD but freaks out Java (kindof). The server starts and drops you into the setupwizard. The test of the LDAP connection (and therefore the password) works fine but the routine stops with the (wellknown) Error 500. Openfire-server runs as if nothing happened, but the javalogs state that Java is really in trouble because its missing the entity behind the “&” (if I recall correctly).

Nevermind…it would be nice if you could add a check to your wizard or the config that reminds the user of the problem or even better, modify the way the password is saved, so java doesnt try to work with the code that is actually none of its business

Hi #2,

do you still have the stack trace?

Are you using Openfire 3.2.2?

It seems to be a problem with escaping & right and I’d create an issue to get this fixed … and a stack trace helps the developer a lot for the first short review.

LG

Sorry for not posting the important bits…I was halfway out of the office when I posted

The server is a 3.2.2 on a 2.6 Gentoo

The error is easy to replicate: Simply put a & somewhere betreen start the server and watch…

Aaaaand heeere comes the trace:

error.log

2007.09.10 16:23:56 org.jivesoftware.util.XMLProperties.buildDoc(XMLProperties.java:467) Error reading XML properties

org.dom4j.DocumentException: Error on line 57 of document : The entity name must immediately follow the ‘&’ in the entity reference. Nested exception: The entity name must immediately follow the ‘&’ in the entity reference.

at org.dom4j.io.SAXReader.read(SAXReader.java:482)

at org.dom4j.io.SAXReader.read(SAXReader.java:365)

at org.jivesoftware.util.XMLProperties.buildDoc(XMLProperties.java:464)

at org.jivesoftware.util.XMLProperties.(XMLProperties.java:112)

at org.jivesoftware.util.XMLProperties.(XMLProperties.java:61)

at org.jivesoftware.util.JiveGlobals.loadSetupProperties(JiveGlobals.java:771)

at org.jivesoftware.util.JiveGlobals.getHomeDirectory(JiveGlobals.java:228)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jivesoftware.openfire.admin.setup.index_jsp._jspService(index_jsp.java:132)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1074)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:65)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:69)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollect ion.java:146)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:285)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.j ava:751)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

Nested exception:

org.xml.sax.SAXParseException: The entity name must immediately follow the ‘&’ in the entity reference.

at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseExcep tion(ErrorHandlerWrapper.java:236)

at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHan dlerWrapper.java:215)

at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorRe porter.java:386)

at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorRe porter.java:316)

at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner. java:1438)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEnti tyReference(XMLDocumentFragmentScannerImpl.java:1293)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Fragment ContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1756)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocu ment(XMLDocumentFragmentScannerImpl.java:368)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Config uration.java:834)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Config uration.java:764)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXP arser.java:1242)

at org.dom4j.io.SAXReader.read(SAXReader.java:465)

at org.dom4j.io.SAXReader.read(SAXReader.java:365)

at org.jivesoftware.util.XMLProperties.buildDoc(XMLProperties.java:464)

at org.jivesoftware.util.XMLProperties.(XMLProperties.java:112)

at org.jivesoftware.util.XMLProperties.(XMLProperties.java:61)

at org.jivesoftware.util.JiveGlobals.loadSetupProperties(JiveGlobals.java:771)

at org.jivesoftware.util.JiveGlobals.getHomeDirectory(JiveGlobals.java:228)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jivesoftware.openfire.admin.setup.index_jsp._jspService(index_jsp.java:132)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1074)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:65)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:69)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1065)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollect ion.java:146)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:285)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.j ava:751)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

JM-1112 to vote for this issue and to track it.