Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unquote secret_access_key in s3CloudSender plugin #1228

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sarracenia/flowcb/send/s3CloudSender.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
from sarracenia.flowcb import FlowCB
import boto3
from botocore.exceptions import ClientError
from urllib.parse import unquote

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -167,6 +168,9 @@ def __init__(self, options):
self.s3_url = "https://"+netloc[1] if not (type(netloc[1]) == str and netloc[1] == "None") else None
self.access_key_id = usr_pwd[0] if not (type(usr_pwd[0]) == str and usr_pwd[0] == "None") else None
self.secret_access_key = usr_pwd[1] if not (type(usr_pwd[1]) == str and usr_pwd[1] == "None") else None
if self.secret_access_key:
# sometimes the key will have a slash in it, in that case, the slash should be changed to %2F in credentials.conf
self.secret_access_key = unquote(self.secret_access_key)

logger.info(f"Successfully loaded credentials for sendTo URL {self.o.sendTo}")

Expand Down
Loading