Skip to content

Commit 1231148

Browse files
authored
Modify Base64 Encode Decode in Python (#4588)
1 parent 7e7864b commit 1231148

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

archive/p/python/base64_encode_decode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def base64_encode(s: str) -> str:
1414

1515

1616
def base64_decode(s: str) -> str:
17-
return base64.b64decode(s.encode("ascii")).decode("ascii")
17+
return base64.b64decode(s.encode("ascii"), validate=True).decode("ascii")
1818

1919

2020
def main() -> None | NoReturn:

0 commit comments

Comments
 (0)