diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-07-28 19:50:27 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-08-16 19:34:52 +0000 |
commit | b0479aab297f041aa9842c3e1996d62c16d7dbcf (patch) | |
tree | 7a24c4a150bba291b10335c4fce9cf2d9cad46a4 /src/corelib/io/qurl_p.h | |
parent | 04bbf534f98387073ce327eac2718e0170f8d8c0 (diff) |
QUrl: Make sure we do reject URLs for which IDNA nameprep failed
qt_nameprep() already reset the string to its original length to
indicate failure, but we didn't handle that in qt_ACE_do(). So make it
have a return value whcih makes it easier to handle that case and do
handle it.
[ChangeLog][QtCore][QUrl] Fixed a bug that caused URLs whose hostnames
contained unassigned or prohibited Unicode codepoints to report
isValid() = true, despite clearing the hostname.
Change-Id: I41e7b3bced5944239f41fffd1545b7274c4b419d
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/io/qurl_p.h')
-rw-r--r-- | src/corelib/io/qurl_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qurl_p.h b/src/corelib/io/qurl_p.h index cb88cac35e..1b9237e58a 100644 --- a/src/corelib/io/qurl_p.h +++ b/src/corelib/io/qurl_p.h @@ -65,7 +65,7 @@ extern Q_AUTOTEST_EXPORT int qt_urlRecode(QString &appendTo, const QChar *begin, enum AceLeadingDot { AllowLeadingDot, ForbidLeadingDot }; enum AceOperation { ToAceOnly, NormalizeAce }; extern QString qt_ACE_do(const QString &domain, AceOperation op, AceLeadingDot dot); -extern Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from); +extern Q_AUTOTEST_EXPORT bool qt_nameprep(QString *source, int from); extern Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len); extern Q_AUTOTEST_EXPORT void qt_punycodeEncoder(const QChar *s, int ucLength, QString *output); extern Q_AUTOTEST_EXPORT QString qt_punycodeDecoder(const QString &pc); |