https://bugs.kde.org/show_bug.cgi?id=421878

            Bug ID: 421878
           Summary: LocalDomainUriFilter::filterUri prepends 'http://' in
                    the event of a dns lookup timeout (QHostInfo)
           Product: frameworks-kio
           Version: git master
          Platform: Compiled Sources
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: fa...@kde.org
          Reporter: bengruber...@gmail.com
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

SUMMARY
LocalDomainUriFilter::filterUri is calling LocalDomainUriFilter::exists to
determine whether it needs to prepend a "http://"; to the specified uri. The
exists function calls HostInfo::lookupHost, which returns a default constructed
QHostInfo in the event of a timeout. The QHostInfo object returns
QHostInfo::NoError by default when its error() method is called, causing
LocalDomainUriFilter::exists to return true in the event of a DNS lookup
timeout. This can lead to erroneous filtering in the event of a timeout.

STEPS TO REPRODUCE
1. Run kiowidgets-kurifiltertest (maybe you need to do something to force a
timeout. I'm not sure why it is happening for me and 

OBSERVED RESULT
The effect of this is the kiowidgets-kurifiltertest autotest fails in my case:
filtering "KDE" to "http://KDE"; because the lookup on "KDE" times out (qt would
take 5 seconds to time out, but kio aborts the lookup after 1.5 seconds).

EXPECTED RESULT
Not sure if LocalDomainUriFilter::exists should be updated (maybe it breaks
something) or if the autotests should or if my getaddressinfo is just acting
strangely. 

Intuitively I would expect LocalDomainUriFilter::exists to return false on
timeout.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: git master
Qt Version: git branch 5.14

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to