qt6-bb10/tests/auto/corelib/serialization
Lars Knoll fd4be84d23 Add an expansion limit for entities
Recursively defined entities can easily exhaust all available
memory. Limit entity expansion to a default of 4096 characters to
avoid DoS attacks when a user loads untrusted content.

Added a setter and getter to allow modifying the expansion limit.

[ChangeLog][QtCore][QXmlStream] QXmlStreamReader does now by default
limit the expansion of entities to 4096 characters. Documents where
a single entity expands to more characters than the limit are not
considered well formed. The limit is there to avoid DoS attacks through
recursively expanding entities when loading untrusted content. The
limit can be changed through the QXmlStreamReader::setEntityExpansionLimit()
method.

Fixes: QTBUG-47417
Change-Id: I94387815d74fcf34783e136387ee57fac5ded0c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-26 22:08:38 +01:00
..
json Fix parameter of QJsonObject::const_iterator operator-(const_iterator) 2020-01-03 14:59:20 +01:00
qcborstreamreader Fix QCborStreamReader not flushing QIODevices due to internal buffering 2019-07-19 12:31:42 -07:00
qcborstreamwriter Long live QCborStreamWriter! 2018-05-27 22:41:41 +00:00
qcborvalue Don't wrap feature detection macros with QT_HAS_FOO() variants 2019-12-10 00:48:07 +01:00
qcborvalue_json QCborValue: move the toDiagnosticNotation() function to its own file 2018-07-30 16:21:12 +00:00
qdatastream tst_QDataStream::readQCursor(): Replace deprecated QCursor API 2020-02-01 07:31:02 +08:00
qdatastream_core_pixmap Tidy up data-stream test 2019-10-25 11:44:13 +02:00
qtextstream Update for failures only on dev branch. Use general platform names 2019-08-19 18:22:11 +02:00
qxmlstream Add an expansion limit for entities 2020-02-26 22:08:38 +01:00
serialization.pro Exclude tests that need GUI when GUI isn't available 2019-10-25 11:42:09 +02:00