Skip to content

[python] Fix REST signature mismatch by encoding query param values#7568

Merged
JingsongLi merged 5 commits intoapache:masterfrom
XiaoHongbo-Hope:url_encode_fix
Apr 1, 2026
Merged

[python] Fix REST signature mismatch by encoding query param values#7568
JingsongLi merged 5 commits intoapache:masterfrom
XiaoHongbo-Hope:url_encode_fix

Conversation

@XiaoHongbo-Hope
Copy link
Copy Markdown
Contributor

@XiaoHongbo-Hope XiaoHongbo-Hope commented Mar 31, 2026

Purpose

Requests with special characters in query parameters (e.g. functionNamePattern=func%) fail with 401 NotAuthorizedException: "accessKeyId validate failed with error message: current signature xxx not match". This PR fixes above issue by encoding query param values

Tests

XiaoHongbo-Hope and others added 5 commits March 31, 2026 01:12
… RESTAuthParameter

Java RESTAuthParameter constructor calls encodeString() on parameter
values before signing, but Python did not. This caused signature
mismatch when query params contain special characters like '%'
(e.g. functionNamePattern=func%).
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as ready for review March 31, 2026 14:08
@JingsongLi
Copy link
Copy Markdown
Contributor

+1

@JingsongLi JingsongLi merged commit 1e989c8 into apache:master Apr 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants