File kcookiejar-Fix-reading-Accept-For-Session-cookie-setting.patch of Package kio
From 0d64e4fb4cf2a9f1ebe681de85ffc4221f291906 Mon Sep 17 00:00:00 2001
From: Wolfgang Bauer <wbauer@tmo.at>
Date: Wed, 1 Jul 2020 10:08:36 +0000
Subject: [PATCH] [kcookiejar] Fix reading "Accept For Session" cookie setting
Since commit 23874cab, the "Cookies" KCM writes the option as "Accept For Session" (with spaces), probably by accident, which broke reading the saved setting.
The KCM has been adjusted later on (in commit efeda6c1) to accept both spellings when loading the settings.
But the daemon itself still only understands "AcceptForSession" (without spaces), so it still asks the user what to do with cookies in this case.
This patch applies the same fix to the daemon, so that changing the setting in the KCM actually works as expected.
CCBUG: 386325
---
src/ioslaves/http/kcookiejar/kcookiejar.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ioslaves/http/kcookiejar/kcookiejar.cpp b/src/ioslaves/http/kcookiejar/kcookiejar.cpp
index 47a589c4..74c4f63e 100644
--- a/src/ioslaves/http/kcookiejar/kcookiejar.cpp
+++ b/src/ioslaves/http/kcookiejar/kcookiejar.cpp
@@ -154,7 +154,7 @@ KCookieAdvice KCookieJar::strToAdvice(const QString &_str)
return KCookieDunno;
}
- QString advice = _str.toLower();
+ QString advice = _str.toLower().remove(QLatin1Char(' '));
if (advice == QL1S("accept")) {
return KCookieAccept;
--
GitLab