From 3d512d88f121da2aef18acf71119a96cb72b510a Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 09:33:54 +0200 Subject: [PATCH] [pritunl] removed unnecessary data from auth string (#4530) (#4537) * removed unnecessary data from auth string * add changelog Co-authored-by: vadim (cherry picked from commit 51a68517ce25d9e0da30db3866b5f8e1f1e628af) Co-authored-by: vvatlin --- changelogs/fragments/4530-fix-unauthorized-pritunl-request.yaml | 2 ++ plugins/module_utils/net_tools/pritunl/api.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4530-fix-unauthorized-pritunl-request.yaml diff --git a/changelogs/fragments/4530-fix-unauthorized-pritunl-request.yaml b/changelogs/fragments/4530-fix-unauthorized-pritunl-request.yaml new file mode 100644 index 0000000000..6b5bbd716d --- /dev/null +++ b/changelogs/fragments/4530-fix-unauthorized-pritunl-request.yaml @@ -0,0 +1,2 @@ +bugfixes: + - pritunl - fixed bug where pritunl plugin api add unneeded data in ``auth_string`` parameter (https://github.com/ansible-collections/community.general/issues/4527). diff --git a/plugins/module_utils/net_tools/pritunl/api.py b/plugins/module_utils/net_tools/pritunl/api.py index 4dffe2b626..91f97ecc96 100644 --- a/plugins/module_utils/net_tools/pritunl/api.py +++ b/plugins/module_utils/net_tools/pritunl/api.py @@ -337,7 +337,6 @@ def pritunl_auth_request( auth_string = "&".join( [api_token, auth_timestamp, auth_nonce, method.upper(), path] - + ([data] if data else []) ) auth_signature = base64.b64encode(