<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>284299</bug_id>
          
          <creation_ts>2011-10-17 19:30:32 +0000</creation_ts>
          <short_desc>Cookie management dialog not showing some cookies</short_desc>
          <delta_ts>2012-05-09 10:25:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>kcookiejar</component>
          <version>Git</version>
          <rep_platform>Unlisted Binaries</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Gregorio Guidi">greg_g</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>adawit</cc>
    
    <cc>kde_bugs</cc>
          
          <cf_commitlink>http://commits.kde.org/kdelibs/2b0f80a196425724080ff4af9e5fc9375e9a592a</cf_commitlink>
          <cf_versionfixedin>4.8.3</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>20</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1174392</commentid>
    <comment_count>0</comment_count>
      <attachid>64645</attachid>
    <who name="Gregorio Guidi">greg_g</who>
    <bug_when>2011-10-17 19:30:32 +0000</bug_when>
    <thetext>Created attachment 64645
Fix cookie management dialog not showing some cookies

Version:           Git (using Devel) 
OS:                Linux

In &quot;Configure konqueror...&quot; -&gt; cookies -&gt; management, sometimes cookies are not shown when clicking on an item. An example is given by cookies from forums.gentoo.org.

This happens after commit ee6b38ff9c989e9dff9a6646fd68d0878868027e
which does the following:

--- a/kioslave/http/kcookiejar/kcookiejar.cpp
+++ b/kioslave/http/kcookiejar/kcookiejar.cpp
@@ -1110,7 +1110,7 @@ KHttpCookieList *KCookieJar::getCookieList(const QString &amp; _domain,
     if (_domain.isEmpty())
         stripDomain(_fqdn, domain);
     else
-        stripDomain (_domain, domain);
+        domain = _domain;
 
     return m_cookieDomains.value(domain);
 }

The problem is fixed by integrating that commit with an analogous change in stripDomain(const KHttpCookie&amp; cookie): (see also attached patch)


--- a/kioslave/http/kcookiejar/kcookiejar.cpp
+++ b/kioslave/http/kcookiejar/kcookiejar.cpp
@@ -532,7 +532,7 @@ QString KCookieJar::stripDomain(const KHttpCookie&amp; cookie)
     if (cookie.domain().isEmpty())
        stripDomain( cookie.host(), domain);
     else
-       stripDomain( cookie.domain(), domain);
+       domain = cookie.domain();
     return domain;
 }
 


Reproducible: Always

Steps to Reproduce:
Visit forums.gentoo.org, go to &quot;Configure konqueror...&quot; -&gt; cookies -&gt; management and click on cookie list.

Actual Results:  
Cookie details not shown.

Expected Results:  
Cookie details shown.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1174413</commentid>
    <comment_count>1</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2011-10-17 20:14:40 +0000</bug_when>
    <thetext>This has already been fixed in the kdelibs 4.7 and frameworks branches. See

https://projects.kde.org/projects/kde/kdelibs/repository/revisions/ee6b38ff9c989e9dff9a6646fd68d0878868027e

Hopefully you generated the patch against an older version of kdelibs code base because the master branch of kdelibs is dead and should not be used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1174795</commentid>
    <comment_count>2</comment_count>
    <who name="Gregorio Guidi">greg_g</who>
    <bug_when>2011-10-18 17:11:13 +0000</bug_when>
    <thetext>&gt; https://projects.kde.org/projects/kde/kdelibs/repository/revisions/ee6b38ff9c989e9dff9a6646fd68d0878868027e

Hi Dawit, actually what I wanted to say is that the commit above fixes the cookies not showing for some sites, but causes cookies not showing for other sites.

That commit changes the logic in KCookieJar::getCookieList(...), however the same logic is duplicated in KCookieJar::stripDomain(const KHttpCookie&amp; cookie). With the attached patch the logic is changed there in the same way. In my testing, this fixes all the occurrences of cookies not showing, both old testcases and new ones.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1241586</commentid>
    <comment_count>3</comment_count>
    <who name="Anguo">kde_bugs</who>
    <bug_when>2012-03-31 10:32:11 +0000</bug_when>
    <thetext>I have the same or at least a very similar issue and I am not sure if it has been fixed since.

With KDE 4.6.5, cookies where the domain value is empty are not listed in the cookie management dialog. They are listed in the file  ~/.kde/share/apps/kcookiejar/cookies.

I am a bit confused about the different between the &apos;host&apos; and the &apos;domain&apos; values. In any case, cookies without a domain value are not listed under the relevant host.

Apparently, this is the issue that Dawitt said got fixed in the 4.7 branch, but since Gregorio seems to be having further issues despite the fix, I thought I&apos;d report this, just in case...

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1247919</commentid>
    <comment_count>4</comment_count>
    <who name="Dawit Alemayehu">adawit</who>
    <bug_when>2012-04-20 14:57:42 +0000</bug_when>
    <thetext>Git commit 01c0d95e025d8c6e297db7a89a3d2929b05ca1f9 by Dawit Alemayehu.
Committed on 20/04/2012 at 16:54.
Pushed by adawit into branch &apos;KDE/4.8&apos;.

Fixed the issue of some cookies not showing up in the cookie management dialog.
FIXED-IN: 4.8.3

M  +1    -1    kioslave/http/kcookiejar/kcookiejar.cpp

http://commits.kde.org/kdelibs/01c0d95e025d8c6e297db7a89a3d2929b05ca1f9</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1247920</commentid>
    <comment_count>5</comment_count>
    <who name="Anguo">kde_bugs</who>
    <bug_when>2012-04-20 15:00:01 +0000</bug_when>
    <thetext>Thank you, Dawit!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1253429</commentid>
    <comment_count>6</comment_count>
    <who name="Ivan Čukić">ivan.cukic</who>
    <bug_when>2012-05-09 10:25:32 +0000</bug_when>
    <thetext>Git commit 2b0f80a196425724080ff4af9e5fc9375e9a592a by Ivan Čukić, on behalf of Dawit Alemayehu.
Committed on 20/04/2012 at 16:54.
Pushed by ivan into branch &apos;ivan/plasma-active-patches&apos;.

Fixed the issue of some cookies not showing up in the cookie management dialog.
FIXED-IN: 4.8.3

M  +1    -1    kioslave/http/kcookiejar/kcookiejar.cpp

http://commits.kde.org/kdelibs/2b0f80a196425724080ff4af9e5fc9375e9a592a</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>64645</attachid>
            <date>2011-10-17 19:30:32 +0000</date>
            <delta_ts>2011-10-17 19:30:32 +0000</delta_ts>
            <desc>Fix cookie management dialog not showing some cookies</desc>
            <filename>Fix-cookie-management-dialog-not-showing-some-cookie.patch</filename>
            <type>text/plain</type>
            <size>1043</size>
            <attacher name="Gregorio Guidi">greg_g</attacher>
            
              <data encoding="base64">RnJvbSAxYjI2M2UwNWUxZTI4NjQzNzhkMzUxYWVhOTczMGMyMWZhNDRlNmIwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBHcmVnb3JpbyBHdWlkaSA8Z3JlZ29yaW8uZ3VpZGlAZ21haWwu
Y29tPgpEYXRlOiBTdW4sIDE2IE9jdCAyMDExIDE0OjQ1OjIyICswMjAwClN1YmplY3Q6IFtQQVRD
SF0gRml4IGNvb2tpZSBtYW5hZ2VtZW50IGRpYWxvZyBub3Qgc2hvd2luZyBzb21lIGNvb2tpZXMK
CkFmdGVyIGNvbW1pdCBlZTZiMzhmZjljOTg5ZTlkZmY5YTY2NDZmZDY4ZDA4Nzg4NjgwMjdlCnNv
bWUgY29va2llcyAoZS5nLiBmcm9tIGZvcnVtcy5nZW50b28ub3JnKSBhcmUgbm90IHNob3duLgpD
b3JyZWN0IHRoZSBwcm9ibGVtIGJ5IGludGVncmF0aW5nIHRoYXQgY29tbWl0IHdpdGggYW4gYW5h
bG9nb3VzCmNoYW5nZSBpbiBzdHJpcERvbWFpbigpLgotLS0KIGtpb3NsYXZlL2h0dHAva2Nvb2tp
ZWphci9rY29va2llamFyLmNwcCB8ICAgIDIgKy0KIDEgZmlsZXMgY2hhbmdlZCwgMSBpbnNlcnRp
b25zKCspLCAxIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2tpb3NsYXZlL2h0dHAva2Nvb2tp
ZWphci9rY29va2llamFyLmNwcCBiL2tpb3NsYXZlL2h0dHAva2Nvb2tpZWphci9rY29va2llamFy
LmNwcAppbmRleCBjNzVlMzQ1Li4yNTRjZjczIDEwMDY0NAotLS0gYS9raW9zbGF2ZS9odHRwL2tj
b29raWVqYXIva2Nvb2tpZWphci5jcHAKKysrIGIva2lvc2xhdmUvaHR0cC9rY29va2llamFyL2tj
b29raWVqYXIuY3BwCkBAIC01MzIsNyArNTMyLDcgQEAgUVN0cmluZyBLQ29va2llSmFyOjpzdHJp
cERvbWFpbihjb25zdCBLSHR0cENvb2tpZSYgY29va2llKQogICAgIGlmIChjb29raWUuZG9tYWlu
KCkuaXNFbXB0eSgpKQogICAgICAgIHN0cmlwRG9tYWluKCBjb29raWUuaG9zdCgpLCBkb21haW4p
OwogICAgIGVsc2UKLSAgICAgICBzdHJpcERvbWFpbiggY29va2llLmRvbWFpbigpLCBkb21haW4p
OworICAgICAgIGRvbWFpbiA9IGNvb2tpZS5kb21haW4oKTsKICAgICByZXR1cm4gZG9tYWluOwog
fQogCi0tIAoxLjcuMy40Cgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>