| Summary: | LocalDomainUriFilter::filterUri prepends 'http://' in the event of a dns lookup timeout (QHostInfo) | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Ben Gruber <bengruber250> |
| Component: | general | Assignee: | David Faure <faure> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | a.samirh78, kdelibs-bugs-null, nate |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/frameworks/kio/commit/576b612e0d3e3f12457bc17592f696630b433188 | Version Fixed/Implemented In: | 5.71.0 |
| Sentry Crash Report: | |||
|
Description
Ben Gruber
2020-05-21 18:43:57 UTC
Git commit 576b612e0d3e3f12457bc17592f696630b433188 by Ahmad Samir. Committed on 27/05/2020 at 07:09. Pushed by dfaure into branch 'master'. [HostInfo] Set QHostInfo::HostNotFound when a host isn't found in the DNS cache Here is the chain, AFAIU, in order: LocalDomainUriFilter::exists() KUriFilterPlugin::resolveName() KIO::HostInfo::lookupHost() HostInfo::lookupCachedHostInfoFor() the latter would return a default constructed QHostInfo object, calling error() on it would return QHostInfo::NoError, which is wrong since we didn't find that host in the KIO DNS cache. This made the KUriFilterTest::executables unit test fail when there's something with the connection and both the DNS lookup times out and the host can't be found the KIO cache. Thanks to Ben Gruber in the bug report for figuring it out. I've verified the whole sequence by following the code via gdb. FIXED-IN: 5.71.0 M +4 -1 src/core/hostinfo.cpp https://invent.kde.org/frameworks/kio/commit/576b612e0d3e3f12457bc17592f696630b433188 |