Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devel/py-python-bugzilla: Fix for API key leak #138

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions devel/py-bugzilla/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

DISTNAME= python-bugzilla-3.2.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
PKGREVISION= 1
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/python-bugzilla/}

Expand Down
1 change: 1 addition & 0 deletions devel/py-bugzilla/distinfo
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ $NetBSD: distinfo,v 1.5 2022/07/08 14:01:33 wiz Exp $
BLAKE2s (python-bugzilla-3.2.0.tar.gz) = d92cf6d3e3defd7f44349756507f631041851581395b3a303159d692201f441d
SHA512 (python-bugzilla-3.2.0.tar.gz) = 215945a0ffd637be5567839303a738a0eef74427838bf0074a5f0ab6022306f47fc0dd5c43a3513b627fb458711f38046321ee9c2c3d43b61ffc577d6dd12375
Size (python-bugzilla-3.2.0.tar.gz) = 114279 bytes
SHA1 (patch-bugzilla___session.py) = 76b9c42367f26cba73923f2cbe6ba03a8aeb7b3e
23 changes: 23 additions & 0 deletions devel/py-bugzilla/patches/patch-bugzilla___session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- bugzilla/_session.py
+++ bugzilla/_session.py
@@ -98,14 +98,14 @@ def request(self, *args, **kwargs):
if "timeout" not in kwargs:
kwargs["timeout"] = timeout

- response = self._session.request(*args, **kwargs)
+ try:
+ response = self._session.request(*args, **kwargs)

- if self._is_xmlrpc:
- # Yes this still appears to matter for properly decoding unicode
- # code points in bugzilla.redhat.com content
- response.encoding = "UTF-8"
+ if self._is_xmlrpc:
+ # This still appears to matter for properly decoding unicode
+ # code points in bugzilla.redhat.com content
+ response.encoding = "UTF-8"

- try:
response.raise_for_status()
except requests.HTTPError as e:
# Scrape the api key out of the returned exception string