qt5base-lts/tests/auto/corelib
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
..
animation Flatten version-specific blacklisting on macOS to all macOS versions 2020-01-22 17:58:31 +01:00
codecs Port from QStringViewLiteral to u"" 2019-07-29 11:17:28 +03:00
global Merge remote-tracking branch 'origin/5.14' into 5.15 2020-01-09 20:30:39 +01:00
io Merge remote-tracking branch 'origin/5.14' into 5.15 2020-02-26 01:00:08 +01:00
itemmodels QIdentityProxyModel: implement moveRows / moveColumns 2020-01-02 17:48:07 +01:00
kernel Detect double timer during single timeout in registerTimer test, and skip 2020-02-22 02:52:36 +01:00
mimetypes Remove handling of missing Q_COMPILER_RVALUE_REFS 2019-05-01 20:24:45 +00:00
plugin Avoid initializing QFlags with 0 or nullptr in tests 2019-11-26 09:08:51 +01:00
serialization Add an expansion limit for entities 2020-02-26 22:08:38 +01:00
statemachine std::chrono overload added to QStateMachine::postDelayedEvent() 2020-02-10 15:04:39 +01:00
text Merge remote-tracking branch 'origin/5.14' into 5.15 2020-02-18 09:26:53 +01:00
thread Add a constructor for QRunnable from anonymous functions 2020-01-31 19:20:43 +01:00
time Deprecate locale-related DateFormat enum members 2020-01-31 19:20:43 +01:00
tools QScopeGuard: Fix build failures with qScopeGuard() 2020-02-01 11:07:08 +02:00
corelib.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00