We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d61ea7d commit 7980622Copy full SHA for 7980622
1 file changed
juju/secrets.py
@@ -27,15 +27,10 @@ def create_secret_data(args):
27
"""
28
data = {}
29
for val in args:
30
- # Remove any base64 padding ("=") before splitting the key=value.
31
- stripped = val.rstrip(base64.b64encode(b"=").decode("utf-8"))
32
- idx = stripped.find("=")
33
- if idx < 1:
+ key, _, value = val.partition('=')
+ if not key or not value:
34
raise ValueError(f"Invalid key value {val}")
35
36
- key = stripped[0:idx]
37
- value = stripped[idx + 1 :]
38
-
39
# If the key doesn't have the #file suffix, then add it to the bag and continue.
40
if not key.endswith(file_suffix):
41
data[key] = value
0 commit comments