mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-08 22:21:08 +01:00
Throw exception if stanza child contains text
This commit is contained in:
parent
5a47f56cd0
commit
eb9242768c
2 changed files with 8 additions and 2 deletions
|
|
@ -289,6 +289,8 @@ public class PacketParserUtils {
|
|||
break outerloop;
|
||||
}
|
||||
break;
|
||||
case XmlPullParser.TEXT:
|
||||
throw new IllegalStateException("Invalid Stanza: Must not contain text or mixed content as direct child of <message/>");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -589,6 +591,8 @@ public class PacketParserUtils {
|
|||
break outerloop;
|
||||
}
|
||||
break;
|
||||
case XmlPullParser.TEXT:
|
||||
throw new IllegalStateException("Invalid Stanza: Must not contain text or mixed content as direct child of <presence/>");
|
||||
}
|
||||
}
|
||||
return presence;
|
||||
|
|
@ -645,6 +649,8 @@ public class PacketParserUtils {
|
|||
break outerloop;
|
||||
}
|
||||
break;
|
||||
case XmlPullParser.TEXT:
|
||||
throw new IllegalStateException("Invalid Stanza: Must not contain text or mixed content as direct child of <iq/>");
|
||||
}
|
||||
}
|
||||
// Decide what to do when an IQ packet was not understood
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue