diff options
author | Marc Mutz <marc.mutz@qt.io> | 2024-04-17 11:57:36 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2024-04-26 02:24:53 +0200 |
commit | 98b034e53a7821018683c05d5dba776f0f2753f0 (patch) | |
tree | 95a638017b3c3ff3583609f7b2ce4404342c7d8c /src/plugins/sqldrivers/db2 | |
parent | a4c663507755ea645ac0acd7333d4750f01d28f7 (diff) |
QRestReply: make charset parsing more robust
The old code was based on QString::split and e.g. didn't handle
escapes in quoted-strings.
Write a modern recursive-descent parser to parse out type/subtype and
charset parameter. Since we don't, yet, support CFWS (see below),
recursion depth is strictly limited, so we're not susceptible to
recursion bombs here.
It currently handles only RFC9110-style grammar, but can be easily
extended to support CFWS (RFC2822-style comments and folding
white-space) or RFC2231-style continuuations, if needed.
It's a bit more general than strictly required, because I expect this
to be reused elsewhere ere long.
Pick-to: 6.7
Fixes: QTBUG-120307
Change-Id: I309928dc350a043672dffb4a259b457764c031be
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/db2')
0 files changed, 0 insertions, 0 deletions