From 7c6e0aedbeaf81dea4ca199428bda7062f10f1fd Mon Sep 17 00:00:00 2001 From: puneet Agrawal Date: Wed, 28 May 2025 13:31:21 +0530 Subject: [PATCH] fixed the signature validation when the different language is there --- CHANGELOG.md | 3 +++ plivo/utils/signature_v3.py | 2 +- plivo/version.py | 2 +- setup.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd25a670..3e4ff7dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Change Log +## [4.59.1](https://github.com/plivo/plivo-python/tree/v4.59.1) (2025-05-28) +- Fixed signature validation. + ## [4.59.0](https://github.com/plivo/plivo-python/tree/v4.59.0) (2025-04-30) **Feature - New Param added for Start Recording API.** - Support `record_channel_type` in Start Recording API and `recordChannelType` in Record XML. diff --git a/plivo/utils/signature_v3.py b/plivo/utils/signature_v3.py index d3842f93..915f4a0b 100644 --- a/plivo/utils/signature_v3.py +++ b/plivo/utils/signature_v3.py @@ -115,6 +115,6 @@ def validate_v3_signature(method, uri, nonce, auth_token, v3_signature, params=N auth_token = bytes(auth_token.encode('utf-8')) nonce = bytes(nonce.encode('utf-8')) v3_signature = bytes(v3_signature.encode('utf-8')) - base_url = construct_get_url(uri, params) if method == 'GET' else construct_post_url(uri, params) + base_url = construct_get_url(uri, params).decode('utf-8') if method == 'GET' else construct_post_url(uri, params).decode('utf-8') signature = get_signature_v3(auth_token, base_url, nonce) return signature in v3_signature.split(b',') diff --git a/plivo/version.py b/plivo/version.py index 4a5a813c..6372b74a 100644 --- a/plivo/version.py +++ b/plivo/version.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -__version__ = '4.59.0' +__version__ = '4.59.1' diff --git a/setup.py b/setup.py index 464e05bd..ee6b44ea 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='plivo', - version='4.59.0', + version='4.59.1', description='A Python SDK to make voice calls & send SMS using Plivo and to generate Plivo XML', long_description=long_description, url='https://github.com/plivo/plivo-python',