diff options
| author | Joanna Hulboj <joanna.hulboj@isode.com> | 2019-09-12 08:54:19 (GMT) |
|---|---|---|
| committer | Joanna Hulboj <joanna.hulboj@isode.com> | 2019-09-16 08:17:07 (GMT) |
| commit | 181ac4a83ba4a82be683fb0a6f08393d3c91320c (patch) | |
| tree | 76e41aac0cda8be5582137d34cb0c9f5683c9dc2 /Swiften/Parser/ExpatParser.h | |
| parent | 415870c04a7e6cabf13e6acf3a94bb0f68732907 (diff) | |
| download | swift-181ac4a83ba4a82be683fb0a6f08393d3c91320c.zip swift-181ac4a83ba4a82be683fb0a6f08393d3c91320c.tar.bz2 | |
Close the stream for disallowed XML features
According to RFC 6120 if any disallowed XML feature is encountered,
we should close the stream with a <restricted-xml/>. The following
features of XML are prohibited in XMPP:
- processing instructions
- internal or external DTD subsets
- internal or external entity references
- comments
Test-information:
Unit tests pass on Windows 10 and Ubuntu 18.04.1 LTS
Change-Id: I475920c91b7f9da51ab37c106a4783a52f6e3cae
Diffstat (limited to 'Swiften/Parser/ExpatParser.h')
| -rw-r--r-- | Swiften/Parser/ExpatParser.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/Parser/ExpatParser.h b/Swiften/Parser/ExpatParser.h index 7583339..34d790d 100644 --- a/Swiften/Parser/ExpatParser.h +++ b/Swiften/Parser/ExpatParser.h @@ -10,19 +10,19 @@ #include <boost/noncopyable.hpp> #include <Swiften/Base/API.h> #include <Swiften/Parser/XMLParser.h> namespace Swift { class SWIFTEN_API ExpatParser : public XMLParser, public boost::noncopyable { public: - ExpatParser(XMLParserClient* client); + ExpatParser(XMLParserClient* client, bool allowComments = false); ~ExpatParser(); bool parse(const std::string& data, bool finalData = false); void stopParser(); private: struct Private; const std::unique_ptr<Private> p; |
Swift