Bug 386325 - KCookieAdvice::adviceToStr and KCookieAdvice::strToAdvice disagree about KCookieAdvice::AcceptForSession
Summary: KCookieAdvice::adviceToStr and KCookieAdvice::strToAdvice disagree about KCoo...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.32.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 374931 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-29 14:17 UTC by Andreas Schwab
Modified: 2020-07-01 20:43 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schwab 2017-10-29 14:17:02 UTC
After commit 23874cab9d handing of KCookieAdvice::AcceptForSession is broken, because strToAdvice(adviceToStr(KCookieAdvice::AcceptForSession)) returns KCookieAdvice::Dunno.
Comment 1 Wolfgang Bauer 2017-10-30 12:04:32 UTC
Seems to be the cause of bug#374931.
Comment 2 David Faure 2017-12-10 09:23:17 UTC
Git commit efeda6c1cc905913ef8cf587d966264d0135aba0 by David Faure, on behalf of Andreas Schwab.
Committed on 10/12/2017 at 09:22.
Pushed by dfaure into branch 'master'.

fix handling of KCookieAdvice::AcceptForSession

Commit 23874cab9d broke the handling of KCookieAdvice::AcceptForSession
because strToAdvice(adviceToStr(KCookieAdvice::AcceptForSession)) now
returns KCookieAdvice::Dunno. Ignore spaces in the argument of
strToAdvice to properly recognize the AcceptForSession setting and
restore
compatibility with previous configs.

M  +1    -1    src/kcms/kio/kcookiespolicyselectiondlg.h

https://commits.kde.org/kio/efeda6c1cc905913ef8cf587d966264d0135aba0
Comment 3 Wolfgang Bauer 2018-02-07 13:16:06 UTC
*** Bug 374931 has been marked as a duplicate of this bug. ***
Comment 4 Wolfgang Bauer 2020-07-01 20:43:36 UTC
Git commit 0d64e4fb4cf2a9f1ebe681de85ffc4221f291906 by Wolfgang Bauer.
Committed on 01/07/2020 at 10:08.
Pushed by dfaure into branch 'master'.

[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.

M  +1    -1    src/ioslaves/http/kcookiejar/kcookiejar.cpp

https://invent.kde.org/frameworks/kio/commit/0d64e4fb4cf2a9f1ebe681de85ffc4221f291906