diff --git a/kio-extras5.changes b/kio-extras5.changes index 774c338..34a884d 100644 --- a/kio-extras5.changes +++ b/kio-extras5.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun May 3 16:28:47 UTC 2020 - Wolfgang Bauer + +- Add smb-accurately-attempt-to-resolve-the-correct-WSD-host.patch + to fix some problems connecting to hosts found via the new + WS-Discovery method (kde#420578) + ------------------------------------------------------------------- Thu Apr 23 12:22:28 UTC 2020 - Luca Beltrame diff --git a/kio-extras5.spec b/kio-extras5.spec index 8e88f55..8f65808 100644 --- a/kio-extras5.spec +++ b/kio-extras5.spec @@ -30,6 +30,8 @@ Group: System/GUI/KDE URL: https://www.kde.org Source: https://download.kde.org/stable/release-service/%{version}/src/%{rname}-%{version}.tar.xz Source99: %{name}-rpmlintrc +# PATCH-FIX-UPSTREAM +Patch: smb-accurately-attempt-to-resolve-the-correct-WSD-host.patch BuildRequires: OpenEXR-devel BuildRequires: flac-devel BuildRequires: gperf @@ -108,6 +110,7 @@ This is the development package for libkioarchive %prep %setup -q -n %{rname}-%{version} +%autopatch -p1 sed -i '/^add_subdirectory( doc )/d' CMakeLists.txt %build diff --git a/smb-accurately-attempt-to-resolve-the-correct-WSD-host.patch b/smb-accurately-attempt-to-resolve-the-correct-WSD-host.patch new file mode 100644 index 0000000..4b0feb9 --- /dev/null +++ b/smb-accurately-attempt-to-resolve-the-correct-WSD-host.patch @@ -0,0 +1,36 @@ +From a4aefbbd35345ba6da80c65723161b7d16d3c431 Mon Sep 17 00:00:00 2001 +From: Harald Sitter +Date: Mon, 27 Apr 2020 11:36:36 +0200 +Subject: smb: accurately attempt to resolve the correct WSD host + +this previously was the wrong variable. m_current_url is only set after +url checking while kurl would be the current url under check. this lead +to state confusion was implicit stat() calls from dolphin on host foo would +evaluate the previous host (e.g. bar) for the wsd suffix. this meant we'll +let a foo with suffix pass through the check, and that just mustn't ever +happen. + +BUG: 420578 +FIXED-IN: 20.04.1 +--- + smb/kio_smb_browse.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/smb/kio_smb_browse.cpp b/smb/kio_smb_browse.cpp +index 048cea5..b6d956f 100644 +--- a/smb/kio_smb_browse.cpp ++++ b/smb/kio_smb_browse.cpp +@@ -234,8 +234,8 @@ QUrl SMBSlave::checkURL(const QUrl &kurl_) const + // NB: smbc has no way to resolve a name without also triggering auth etc.: we must + // rely on the system's ability to resolve DNSSD for this check. + const QLatin1String wsdSuffix(".kio-discovery-wsd"); +- if (m_current_url.host().endsWith(wsdSuffix)) { +- QString host = m_current_url.host(); ++ if (kurl.host().endsWith(wsdSuffix)) { ++ QString host = kurl.host(); + host.chop(wsdSuffix.size()); + const QString dnssd(host + ".local"); + auto dnssdHost = QHostInfo::fromName(dnssd); +-- +cgit v1.1 +