Skip to content

Commit 77424cb

Browse files
author
Lloyd Watkin
committed
If the 'additional element' has spaces, its an error message
1 parent 6f8559a commit 77424cb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/PubSubElementProcessorAbstract.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ protected void setErrorCondition(Type type, Condition condition) {
108108

109109
protected void createExtendedErrorReply(Type type, Condition condition,
110110
String additionalElement) {
111+
if ((null != additionalElement) && (additionalElement.indexOf(" ") > -1)) {
112+
// Its probably an error message!
113+
createExtendedErrorReply(type, condition, null, null, additionalElement);
114+
return;
115+
}
111116
createExtendedErrorReply(type, condition, additionalElement,
112117
JabberPubsub.NS_PUBSUB_ERROR);
113118
}

0 commit comments

Comments
 (0)