Reduce strictness of QOAuthUriSchemeReplyHandler path check
Some authorization servers (notably Microsoft) may add an extra '/'
path in the redirect URI. This means that an URI such as:
com.example:/something?code=321
becomes
com.example:/something/?code=321
Note the extra trailing '/'. This in turn then makes
QOAuthUriSchemeReplyHandler to treat the redirect as a URI mismatch.
This commit reduces the strictness of this check by treating '/'
and empty path as equal. This should not weaken the security model.
RFCs are strict about server-side URI matching, but not about the
client-side URI matching, and client-side URI normalization for
comparison purposes is a common practice. In fact, some popular
frameworks compare *only* host and port (and scheme).
[ChangeLog][QOAuthUriSchemeReplyHandler] Treat empty path and
'/' as equivalent when comparing redirect URL.
Fixes: QTBUG-143283
Pick-to: 6.11 6.10 6.8
Change-Id: I6a20462187cf2831f9bfb633f09a059f2b01c4fb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>