From 639386759a2506c6b93852b042335ed49df00b10 Mon Sep 17 00:00:00 2001 From: Alex Wenckus Date: Mon, 10 Jul 2006 18:27:40 +0000 Subject: [PATCH] Switch or's to and's so that the exploit can't be used note that this doesn't fix the issue of invalid XML. SMACK-65 git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@4343 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smackx/provider/XHTMLExtensionProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/org/jivesoftware/smackx/provider/XHTMLExtensionProvider.java b/source/org/jivesoftware/smackx/provider/XHTMLExtensionProvider.java index 26f544f7e..1eb09181f 100644 --- a/source/org/jivesoftware/smackx/provider/XHTMLExtensionProvider.java +++ b/source/org/jivesoftware/smackx/provider/XHTMLExtensionProvider.java @@ -70,12 +70,12 @@ public class XHTMLExtensionProvider implements PacketExtensionProvider { buffer.append(StringUtils.escapeForXML(parser.getText())); } } else if (eventType == XmlPullParser.END_TAG) { - if (parser.getName().equals("body") || parser.getDepth() <= depth) { + if (parser.getName().equals("body") && parser.getDepth() <= depth) { buffer.append(parser.getText()); xhtmlExtension.addBody(buffer.toString()); } else if (parser.getName().equals(xhtmlExtension.getElementName()) - || parser.getDepth() <= startDepth) { + && parser.getDepth() <= startDepth) { done = true; } else {