summaryrefslogtreecommitdiffstats
path: root/tests/tests.pro
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-09-02 13:32:11 -0700
committerThiago Macieira <thiago.macieira@intel.com>2014-09-28 01:28:29 +0200
commit0c32af08a6d13b1db5bfedb248afc583c2fc22bc (patch)
tree3b13090a16ad05a1cc2e58f814f908ae4a8b2f07 /tests/tests.pro
parent10a0f93c86e8be018119a07123b88d3e4a5e584c (diff)
Fix handling of IPv6 addresses in QUrl::fromUserInput
IPv6 addresses can start with ":", for which QDir::isAbsolute() would always return true (QResourceFileEngine::isRelativePath() returns constant false) and would trip the calculation for local files. Similarly, IPv6 addresses can start with strings that look like Windows drives: "a:", "b:", "c:", "d:", "e:" and "f:" (though not today, as those address blocks are unassigned). Since a valid IPv6 address will definitely require at least one more colon and Windows file names cannot contain ':', there's no ambiguity: a valid IPv6 address is never a valid file on Windows. This resolves the ambiguity in favor of IPv6 for Unix filenames (which can contain a colon) and in case of an URL containing scheme, relative path and no authority ("dead:beef::" for example could have been parsed as scheme() == "dead" and path() == "beef::"). Task-number: QTBUG-41089 Change-Id: Id9119af1acf8a75a786519af3b48b4ca3dbf3719 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/tests.pro')
0 files changed, 0 insertions, 0 deletions