Project

General

Profile

Bug #6293

Avatar?id=6098&size=50x50

Cannot set empty photo in VCard

Added by Bartosz Małkowski TigaseTeam over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Database:
n/a
Applicable version:
git/master
Source Code Disclaimer:

Description

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)

Related issues

Related to Tigase Android Messenger - Bug #6230: Unable to set vCardClosed

Associated revisions

Revision 30f1acf3 (diff)
Added by Bartosz Małkowski TigaseTeam over 1 year ago

Bug #6293: Cannot set empty photo in VCard

Revision e871535c (diff)
Added by Bartosz Małkowski TigaseTeam over 1 year ago

Bug #6293: Cannot set empty photo in VCard

History

#1 Avatar?id=6098&size=24x24 Updated by Bartosz Małkowski TigaseTeam over 1 year ago

  • Related to Bug #6230: Unable to set vCard added

#2 Avatar?id=6098&size=24x24 Updated by Bartosz Małkowski TigaseTeam over 1 year ago

  • Status changed from New to In QA
  • Assignee set to Wojciech Kapcia
  • % Done changed from 0 to 100

Can you confirm that it is fixed?

I also added test to test-ng.

#3 Updated by Wojciech Kapcia TigaseTeam over 1 year ago

  • Status changed from In QA to Closed

Looks ok, thank you.

Also available in: Atom PDF