Skip to content

Commit bf64f47

Browse files
dependabot[bot]pre-commit-ci[bot]tykling
authored
Bump pillow from 11.1.0 to 11.2.1 in /src/requirements (#1820)
* Bump pillow from 11.1.0 to 11.2.1 in /src/requirements Bumps [pillow](https://github.com/python-pillow/Pillow) from 11.1.0 to 11.2.1. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](python-pillow/Pillow@11.1.0...11.2.1) --- updated-dependencies: - dependency-name: pillow dependency-version: 11.2.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Thomas Steen Rasmussen <tykling@bornhack.org>
1 parent ee36c66 commit bf64f47

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

src/oauth.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@
3939
headers={"Referer": host + "/login/"},
4040
)
4141
alphabet = string.ascii_uppercase + string.digits
42-
code_verifier = "".join(secrets.choice(alphabet) for i in range(43 + secrets.randbelow(86)))
42+
code_verifier = "".join(
43+
secrets.choice(alphabet) for i in range(43 + secrets.randbelow(86))
44+
)
4345
code_verifier_base64 = base64.urlsafe_b64encode(code_verifier.encode("utf-8"))
4446
code_challenge = hashlib.sha256(code_verifier_base64).digest()
45-
code_challenge_base64 = base64.urlsafe_b64encode(code_challenge).decode("utf-8").replace("=", "")
47+
code_challenge_base64 = (
48+
base64.urlsafe_b64encode(code_challenge).decode("utf-8").replace("=", "")
49+
)
4650
state = "".join(secrets.choice(alphabet) for i in range(15))
4751

4852
data = {
@@ -58,14 +62,19 @@
5862
"scope": "openid profile",
5963
"allow": "Authorize",
6064
}
61-
auth = s.post(host + "/o/authorize/", allow_redirects=False, data=data, headers={"Referer": host + "/o/authorize/"})
62-
if auth.status_code != 302: # noqa: PLR2004
63-
print(f"/o/authorize/ returned status code {auth.status_code} - no token today") # noqa: T201
65+
auth = s.post(
66+
host + "/o/authorize/",
67+
allow_redirects=False,
68+
data=data,
69+
headers={"Referer": host + "/o/authorize/"},
70+
)
71+
if auth.status_code != 302:
72+
print(f"/o/authorize/ returned status code {auth.status_code} - no token today")
6473
sys.exit(1)
6574
url = auth.headers["Location"]
6675
result = urlparse(url)
6776
qs = parse_qs(result.query)
68-
assert state == qs["state"][0] # noqa: S101
77+
assert state == qs["state"][0]
6978
authcode = qs["code"][0]
7079
token = s.post(
7180
host + "/o/token/",
@@ -77,4 +86,4 @@
7786
"code_verifier": code_verifier_base64,
7887
},
7988
)
80-
print(token.json()) # noqa: T201
89+
print(token.json())

src/requirements/production.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Unidecode==1.3.8
3737
wheel==0.45.1
3838

3939
# pillow is only here to make old migrations run
40-
Pillow==11.1.0
40+
Pillow==11.2.1
4141

4242
numpy==2.2.4
4343

0 commit comments

Comments
 (0)