summaryrefslogtreecommitdiffstats
path: root/src/plugins/tls
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-07-12 13:29:17 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-07-13 00:59:49 +0200
commit3eac6079d9a02fbedd3740186eaaf21134dc45c2 (patch)
tree60158368eaa905b9a75ada853d3aedf68f1f102b /src/plugins/tls
parentc0b7d834b066d93bb3314f4bcaec0ab42a661055 (diff)
macOS: Don't mangle QByteArray settings with @ prefix by decoding as UTF-8
QSettings encodes QVariants as @Type(data) strings. If that data contains a null-byte, we write the string as UTF-8 encoded CFData. When reading it back we look for a @ prefix, and then pass it as UTF-8 through stringToVariant. The problem arises then the user writes raw QByteArrays with a @ prefix. We can detect this situation by checking the result of stringToVariant, and if it's just a simple conversion of the string into a QVariant, we know that stringToVariant hit its fallback path due to not finding any embedded variants. If that's the case, we return the raw bytes as a QByteArray. Pick-to: 6.2 6.1 5.15 5.12 Change-Id: I4ac5c35d0a6890ebea983b9aca0a3a36b0143de2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/tls')
0 files changed, 0 insertions, 0 deletions