Projects tigase _server server-core Issues #898
Cannot set empty photo in VCard (#898)
Bartosz Małkowski opened 7 years ago

When client sets new Card with empty <PHOTO/> server throws Exception and do not send any error back to client.

Sent stanza:

<?xml version="1.0" encoding="UTF-8"?>
<iq xmlns="jabber:client" id="s1jJFC" type="set" from="b……r">
   <vCard xmlns="vcard-temp">
      <FN>Bartosz</FN>
      <N>
         <FAMILY />
         <GIVEN />
         <MIDDLE />
      </N>
      <NICKNAME>Bartek</NICKNAME>
      <BDAY />
      <ORG>
         <ORGNAME>Tigase</ORGNAME>
         <ORGUNIT />
      </ORG>
      <TEL>
         <WORK />
         <VOICE />
         <NUMBER />
      </TEL>
      <TEL>
         <WORK />
         <FAX />
         <NUMBER />
      </TEL>
      <TEL>
         <WORK />
         <MSG />
         <NUMBER />
      </TEL>
      <ADR>
         <WORK />
         <STREET />
         <LOCALITY />
         <REGION />
         <PCODE />
         <CTRY />
      </ADR>
      <TEL>
         <HOME />
         <VOICE />
         <NUMBER />
      </TEL>
      <TEL>
         <HOME />
         <FAX />
         <NUMBER />
      </TEL>
      <TEL>
         <HOME />
         <MSG />
         <NUMBER />
      </TEL>
      <ADR>
         <HOME />
         <STREET />
         <LOCALITY />
         <REGION />
         <PCODE />
         <CTRY />
      </ADR>
      <EMAIL>
         <HOME />
         <USERID />
      </EMAIL>
      <EMAIL>
         <WORK />
         <USERID />
      </EMAIL>
      <PHOTO>
         <TYPE />
         <BINVAL />
      </PHOTO>
   </vCard>
</iq>

Exceptions in logs:

java.lang.NullPointerException
	at tigase.xmpp.impl.VCardXMPPProcessorAbstract.lambda$null$98(VCardXMPPProcessorAbstract.java:120)
	at tigase.xml.Element.forEachChild(Element.java:444)
	at tigase.xmpp.impl.VCardXMPPProcessorAbstract.lambda$static$99(VCardXMPPProcessorAbstract.java:72)
	at tigase.xmpp.impl.VCardXMPPProcessorAbstract.setVCard(VCardXMPPProcessorAbstract.java:52)
	at tigase.xmpp.impl.VCardTemp.processFromUserToServerPacket(VCardTemp.java:151)
	at tigase.xmpp.XMPPProcessorAbstract.processFromUserPacket(XMPPProcessorAbstract.java:193)
	at tigase.xmpp.XMPPProcessorAbstract.process(XMPPProcessorAbstract.java:96)
	at tigase.server.xmppsession.SessionManager$ProcessorWorkerThread.process(SessionManager.java:2485)
	at tigase.util.WorkerThread.run(WorkerThread.java:128)
Bartosz Małkowski commented 7 years ago

Can you confirm that it is fixed?

I also added test to test-ng.

wojciech.kapcia@tigase.net commented 7 years ago

Looks ok, thank you.

Referenced from commit 1 year ago
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
6293
Version
tigase-server-8.0.0
Spent time
13h 45m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#898
Please wait...
Page is in error, reload to recover