Commit 57f5eecc authored by Pali Rohár's avatar Pali Rohár
Browse files

Jabber libiris library: Ignore /[\r\n]+/ in vcard base64 photo

CCBUG: 324937
parent 90b5ac49
diff --git a/src/xmpp/xmpp-im/xmpp_vcard.cpp b/src/xmpp/xmpp-im/xmpp_vcard.cpp
index 18aa8b4..3ae2475 100644
--- a/src/xmpp/xmpp-im/xmpp_vcard.cpp
+++ b/src/xmpp/xmpp-im/xmpp_vcard.cpp
@@ -549,7 +549,7 @@ bool VCard::fromXml(const QDomElement &q)
else if ( tag == "NICKNAME" )
d->nickName = i.text().trimmed();
else if ( tag == "PHOTO" ) {
- d->photo = QCA::Base64().stringToArray(subTagText(i, "BINVAL").replace("\n","")).toByteArray();
+ d->photo = QCA::Base64().stringToArray(subTagText(i, "BINVAL").replace(QRegExp("[\r\n]+"),"")).toByteArray();
d->photoURI = subTagText(i, "EXTVAL");
}
else if ( tag == "BDAY" )
......@@ -550,7 +550,7 @@ bool VCard::fromXml(const QDomElement &q)
else if ( tag == "NICKNAME" )
d->nickName = i.text().trimmed();
else if ( tag == "PHOTO" ) {
d->photo = QCA::Base64().stringToArray(subTagText(i, "BINVAL").replace("\n","")).toByteArray();
d->photo = QCA::Base64().stringToArray(subTagText(i, "BINVAL").replace(QRegExp("[\r\n]+"),"")).toByteArray();
d->photoURI = subTagText(i, "EXTVAL");
}
else if ( tag == "BDAY" )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment