Skip to content

Commit 9e45b43

Browse files
committed
devel/py-python-bugzilla: Fix for API key leak
From Ricardo Branco in PR pkg/58213. Fixes NetBSD#138.
1 parent ed2e09c commit 9e45b43

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

devel/py-bugzilla/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# $NetBSD: Makefile,v 1.6 2022/07/08 14:01:33 wiz Exp $
1+
# $NetBSD: Makefile,v 1.7 2024/04/29 18:57:35 bsiegert Exp $
22

33
DISTNAME= python-bugzilla-3.2.0
44
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
5+
PKGREVISION= 1
56
CATEGORIES= devel python
67
MASTER_SITES= ${MASTER_SITE_PYPI:=p/python-bugzilla/}
78

devel/py-bugzilla/distinfo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
$NetBSD: distinfo,v 1.5 2022/07/08 14:01:33 wiz Exp $
1+
$NetBSD: distinfo,v 1.6 2024/04/29 18:57:35 bsiegert Exp $
22

33
BLAKE2s (python-bugzilla-3.2.0.tar.gz) = d92cf6d3e3defd7f44349756507f631041851581395b3a303159d692201f441d
44
SHA512 (python-bugzilla-3.2.0.tar.gz) = 215945a0ffd637be5567839303a738a0eef74427838bf0074a5f0ab6022306f47fc0dd5c43a3513b627fb458711f38046321ee9c2c3d43b61ffc577d6dd12375
55
Size (python-bugzilla-3.2.0.tar.gz) = 114279 bytes
6+
SHA1 (patch-bugzilla___session.py) = 134ed66dae860195941dfc9c908b525a11112246
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
$NetBSD: patch-bugzilla___session.py,v 1.1 2024/04/29 18:57:35 bsiegert Exp $
2+
3+
Fix for API key leak, https://github.com/python-bugzilla/python-bugzilla/issues/187
4+
--- bugzilla/_session.py.orig 2021-10-05 20:49:16.000000000 +0000
5+
+++ bugzilla/_session.py
6+
@@ -97,14 +97,14 @@ class _BugzillaSession(object):
7+
if "timeout" not in kwargs:
8+
kwargs["timeout"] = timeout
9+
10+
- response = self._session.request(*args, **kwargs)
11+
+ try:
12+
+ response = self._session.request(*args, **kwargs)
13+
14+
- if self._is_xmlrpc:
15+
- # Yes this still appears to matter for properly decoding unicode
16+
- # code points in bugzilla.redhat.com content
17+
- response.encoding = "UTF-8"
18+
+ if self._is_xmlrpc:
19+
+ # Yes this still appears to matter for properly decoding unicode
20+
+ # code points in bugzilla.redhat.com content
21+
+ response.encoding = "UTF-8"
22+
23+
- try:
24+
response.raise_for_status()
25+
except Exception as e:
26+
# Scrape the api key out of the returned exception string

0 commit comments

Comments
 (0)