Skip to content

Commit

Permalink
checking if a somewhat valid base URL has been passed to the module (#23
Browse files Browse the repository at this point in the history
)
  • Loading branch information
studerma authored Jul 11, 2024
1 parent 81fe3d1 commit 178e36e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/secretserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,9 @@ def main():
if module.params.get("action") not in permitted_actions:
module.fail_json(msg=f'Action must be one of {", ".join(permitted_actions)}', **result)

if "http" not in module.params.get("secretserver_base_url"):
module.fail_json(msg='You must specify the protocol used to connect to the SecretServer API (HTTP or HTTPS)', **result)

action = module.params.get("action")
if action == "get":
if module.params.get("secret_id") is None or not int(module.params.get("secret_id")):
Expand Down

0 comments on commit 178e36e

Please sign in to comment.