Projects tigase _server server-core Issues #299
NullPointerException on registering a new user (#299)
Closed
Teemu K opened 1 decade ago

Trying to register a new user with Adium client sends a query with empty password:

<iq id="purplecd3a0d8b" type="set" xmlns="jabber:client"><query xmlns="jabber:iq:register"><username>nobody</username><password/><email/></query></iq>

This leads to a NullPointerException in tigase-server:

2014-03-21 14:41:56.562 [jabber:iq:register Queue Worker 0] WorkerThread.run() SEVERE: tigase.server.xmppsession.SessionManager$ProcessorWorkerThread,(jabber:iq:register Queue Worker 0) Exception during packet processing: from=c2s@teemu-imac.local/192.168.0.10_5222_192.168.0.10_55720, to=sess-man@teemu-imac.local, DATA=nobody, SIZE=150, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set

java.lang.NullPointerException

at tigase.xml.XMLUtils.translateAll(XMLUtils.java:107)

at tigase.xml.XMLUtils.unescape(XMLUtils.java:122)

at tigase.xmpp.impl.JabberIqRegister.process(JabberIqRegister.java:225)

at tigase.server.xmppsession.SessionManager$ProcessorWorkerThread.process(SessionManager.java:2689)

at tigase.util.WorkerThread.run(WorkerThread.java:132)
Teemu K commented 1 decade ago

This is if a password has not be inputted into the Adium dialog. Entering a password works fine.

wojciech.kapcia@tigase.net commented 1 decade ago

Yes, it was due to missing password but there should be an error instead of NPE. Fixed and pushed change to repository.

Teemu K commented 1 decade ago

Should it be:

@String pass_enc = null;

if ( null != password ){

pass_enc = XMLUtils.unescape( password );

}@

wojciech.kapcia@tigase.net commented 1 decade ago

yes, corrected.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
1811
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#299
Please wait...
Page is in error, reload to recover