Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoSign in
Socket

apd

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apd - pypi Package Compare versions

Comparing version
0.4.3
to
0.4.4
+1
-1
PKG-INFO
Metadata-Version: 2.1
Name: apd
Version: 0.4.3
Version: 0.4.4
Summary: Tool to access the Analysis production Data

@@ -5,0 +5,0 @@ License: BSD-3-Clause

@@ -51,2 +51,4 @@ [metadata]

E203,
B017,
B905,
select = C,E,F,W,B,B9

@@ -53,0 +55,0 @@ exclude =

Metadata-Version: 2.1
Name: apd
Version: 0.4.3
Version: 0.4.4
Summary: Tool to access the Analysis production Data

@@ -5,0 +5,0 @@ License: BSD-3-Clause

@@ -14,2 +14,3 @@ ###############################################################################

import base64
import binascii
import hashlib

@@ -125,7 +126,16 @@ import json

"""
random_state = secrets.token_hex(8)
code_verifier = secrets.token_hex(96)
code_hash = hashlib.sha256(code_verifier.encode()).digest()
code_challenge = base64.urlsafe_b64encode(code_hash).decode()
random_state = binascii.hexlify(os.urandom(8))
# code_verifier: https://www.rfc-editor.org/rfc/rfc7636#section-4.1
# 48*2 = 96 characters, which is within 43-128 limits.
code_verifier = binascii.hexlify(os.urandom(48))
# code_challenge: https://www.rfc-editor.org/rfc/rfc7636#section-4.2
# BUT Keycloak decided to reject any base64 input containing '=' (!!)
# so we have to remove it even if we are following the standard.
code_challenge = (
base64.urlsafe_b64encode(hashlib.sha256(code_verifier).digest())
.decode()
.replace("=", "")
)
r = requests.post(

@@ -132,0 +142,0 @@ f"{OIDC_BASE_URL}/auth/device",