Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.13.2, 5.15.0
-
-
8a3f8595569a920cf2fa811704dec97ae31be15d (qt/qtdeclarative/dev)
Description
Assigning a string containing URL-encoded characters (e.g. %25) to a QML property of type url automatically converts some of these to their decoded characters.
This is bad if a webserver expects, for example, the actual "%25" instead of "/".
Qt.resolvedUrl() also changes some of those characters.
Code examples:
// contains the original string property string origUrlStr: "https://test.com/a%20b%2fc%25d" // contains "https://test.com/a b/c%25d" property url origUrl: origUrlStr // contains https://test.com/a b%2fc%25d property string resolvedUrlStr: Qt.resolvedUrl(origUrlStr) // contains https://test.com/a b/c%25d property url resolvedUrl: Qt.resolvedUrl(origUrlStr)
As a result, it is impossible to use this URL as the source of a QML Image:
https://firebasestorage.googleapis.com/v0/b/vplaytest-9b010.appspot.com/o/images%2Fvplay-logo.png?alt=media&token=482900ca-e65e-4df2-8df3-cfade271ec8b
Because the "%2F" is changed to "/" and the server then returns status 400:
https://firebasestorage.googleapis.com/v0/b/vplaytest-9b010.appspot.com/o/images/vplay-logo.png?alt=media&token=482900ca-e65e-4df2-8df3-cfade271ec8b
Attachments
Issue Links
- relates to
-
QTBUG-76879 Reconsider where the URL interceptor gets called and what version of a URL is stored
- Closed