Skip to content

Commit bedc11f

Browse files
authored
Merge branch 'main' into dependabot/github_actions/main/production-dependencies-45223d3826
2 parents 88c3523 + 7f1afb9 commit bedc11f

File tree

8 files changed

+2222
-129
lines changed

8 files changed

+2222
-129
lines changed

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ verify_ssl = true
66
[packages]
77
pyyaml = "*"
88
semantic-version = "*"
9-
ghastoolkit = "==0.12.2"
9+
ghastoolkit = "==0.12.3"
1010

1111
[dev-packages]
1212
sphinx = "*"

Pipfile.lock

+60-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/bin/normalizer

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/home/geekmasher/.local/share/virtualenvs/policy-as-code-ys9TzZIz/bin/python
1+
#!/usr/bin/python3
22
# -*- coding: utf-8 -*-
33
import re
44
import sys

vendor/ghastoolkit/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__name__ = "ghastoolkit"
44
__title__ = "GHAS Toolkit"
55

6-
__version__ = "0.12.2"
6+
__version__ = "0.12.3"
77

88
__description__ = "GitHub Advanced Security Python Toolkit"
99
__summary__ = """\

vendor/ghastoolkit/octokit/octokit.py

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
# logger
2626
logger = logging.getLogger("ghastoolkit.octokit")
27+
LOGLEVEL = os.environ.get("LOGLEVEL", "INFO").upper()
28+
if isinstance(logging.getLevelName(LOGLEVEL), int):
29+
logging.basicConfig(level=LOGLEVEL)
2730

2831

2932
class Octokit:

vendor/idna/core.py

+9-14
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ def valid_contextj(label: str, pos: int) -> bool:
150150
joining_type = idnadata.joining_types.get(ord(label[i]))
151151
if joining_type == ord('T'):
152152
continue
153-
if joining_type in [ord('L'), ord('D')]:
153+
elif joining_type in [ord('L'), ord('D')]:
154154
ok = True
155155
break
156+
else:
157+
break
156158

157159
if not ok:
158160
return False
@@ -162,9 +164,11 @@ def valid_contextj(label: str, pos: int) -> bool:
162164
joining_type = idnadata.joining_types.get(ord(label[i]))
163165
if joining_type == ord('T'):
164166
continue
165-
if joining_type in [ord('R'), ord('D')]:
167+
elif joining_type in [ord('R'), ord('D')]:
166168
ok = True
167169
break
170+
else:
171+
break
168172
return ok
169173

170174
if cp_value == 0x200d:
@@ -236,12 +240,8 @@ def check_label(label: Union[str, bytes, bytearray]) -> None:
236240
if intranges_contain(cp_value, idnadata.codepoint_classes['PVALID']):
237241
continue
238242
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTJ']):
239-
try:
240-
if not valid_contextj(label, pos):
241-
raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format(
242-
_unot(cp_value), pos+1, repr(label)))
243-
except ValueError:
244-
raise IDNAError('Unknown codepoint adjacent to joiner {} at position {} in {}'.format(
243+
if not valid_contextj(label, pos):
244+
raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format(
245245
_unot(cp_value), pos+1, repr(label)))
246246
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTO']):
247247
if not valid_contexto(label, pos):
@@ -262,13 +262,8 @@ def alabel(label: str) -> bytes:
262262
except UnicodeEncodeError:
263263
pass
264264

265-
if not label:
266-
raise IDNAError('No Input')
267-
268-
label = str(label)
269265
check_label(label)
270-
label_bytes = _punycode(label)
271-
label_bytes = _alabel_prefix + label_bytes
266+
label_bytes = _alabel_prefix + _punycode(label)
272267

273268
if not valid_label_length(label_bytes):
274269
raise IDNAError('Label too long')

0 commit comments

Comments
 (0)