This bug was fixed in the package py-macaroon-bakery - 1.3.1-3ubuntu0.1

---------------
py-macaroon-bakery (1.3.1-3ubuntu0.1) kinetic; urgency=medium

  * d/p/0001-gh88-fix-saving-macaroons-in-mozillacookie-jar.patch: Fix
    saving cookies to MozillaCookieJar() under python-3.10
    (LP: #1970267)

 -- Alex Murray <alex.mur...@canonical.com>  Thu, 16 Feb 2023 16:10:18
+1030

** Changed in: py-macaroon-bakery (Ubuntu Kinetic)
       Status: Fix Committed => Fix Released

** Changed in: py-macaroon-bakery (Ubuntu Jammy)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of MAAS
Maintainers, which is subscribed to py-macaroon-bakery in Ubuntu.
https://bugs.launchpad.net/bugs/1970267

Title:
  Unable to save macaroons in MozillaCookieJar() under python3.10

Status in py-macaroon-bakery package in Ubuntu:
  Fix Released
Status in py-macaroon-bakery source package in Jammy:
  Fix Released
Status in py-macaroon-bakery source package in Kinetic:
  Fix Released
Status in py-macaroon-bakery source package in Lunar:
  Fix Released

Bug description:
  [ Impact ]

   * USN publication for the Ubuntu Security Team triggers an exception:

    [ELIDED]
      File "/usr/lib/python3.10/http/cookiejar.py", line 2120, in save
        if cookie.has_nonstandard_attr(HTTPONLY_ATTR):
      File "/usr/lib/python3.10/http/cookiejar.py", line 805, in 
has_nonstandard_attr
        return name in self._rest
    TypeError: argument of type 'NoneType' is not iterable

   * this should be fixed so that this error is not shown every time a
     USN is published by one of the team members.

   * other users of py-macaroon-bakery may be similarly affected but this
     is a niche use-case (ie. macaroons and storing cookies in a 
MozillaCookieJar)

  [ Test Plan ]

   * The following simple python script triggers this bug:

  import tempfile
  import os

  from http.cookiejar import MozillaCookieJar
  from macaroonbakery import httpbakery, _utils

  cookiefile = tempfile.NamedTemporaryFile().name
  client = httpbakery.Client(cookies=MozillaCookieJar(cookiefile))
  client.cookies.set_cookie(_utils.cookie(name="foo",
                                          value="bar",
                                          url="https://ubuntu.com/";))
  client.cookies.save()

   * Once fixed no TypeError exception should be seen.

   * Or the following script can be used from the qa-regression-testing
     project:  
https://git.launchpad.net/qa-regression-testing/tree/scripts/test-py-macaroon-bakery.py

  [ Where problems could occur ]

   * For kinetic there is only one reverse dependency of 
     python3-macaroonbakery in the archive - python3-libmaas - which itself 
     has no reverse dependencies/ As such there is not much chance of 
     regression on kinetic as there is no real users of this library in the 
     archive itself, however in this case a simple re-upload of the previous 
     version would fix any issue.

   * For jammy, python3-macaroonbakery is pulled into the default desktop 
     via gnome-online-accounts to enable the integration with Ubuntu One.
     This was historically used for integration with Livepatch but that has
     now been superceded by the Ubuntu Pro client and hence this is not
     actually used by services on jammy anymore 
       - 
https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/161#note_1540077
     
     As such there is no real chance of regression here either.

  
  [ Other Info ]

    * Upstream bug report: https://github.com/go-macaroon-bakery/py-
  macaroon-bakery/issues/88

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/py-macaroon-bakery/+bug/1970267/+subscriptions


-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to     : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp

Reply via email to