Skip to content

Commit b983bb6

Browse files
committed
Make octal int check stricter
1 parent 6b26f4b commit b983bb6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/murfey/util/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def validate_software_versions(cls, v: dict[str, Any]) -> dict[str, str]:
157157
@classmethod
158158
def parse_octal_int(cls, value):
159159
# Attempt to parse the string as an octal int
160-
if isinstance(value, str):
160+
if isinstance(value, str) and value.startswith("0o") and value[2:].isdigit():
161161
return int(value, 8)
162162
# Return value as-is otherwise
163163
return value

0 commit comments

Comments
 (0)