kevinw66 commented on pull request #6314: URL: https://github.com/apache/apisix/pull/6314#issuecomment-1039771809
> Hi! Thanks for detecting the issue and the PR. After looking into the codebase, I find the way of forming the canonical query string unnecessarily complex yet it's not accurate. I would go with a simpler approach rather than pathing this up. > > We can replace: > > https://github.com/apache/apisix/blob/605141cba33beccf71100fdea03c8e9608d4852f/apisix/plugins/hmac-auth.lua#L219-L255 > > > with > https://github.com/apache/apisix/blob/605141cba33beccf71100fdea03c8e9608d4852f/apisix/plugins/aws-lambda.lua#L123-L130 > > > It's very simple, yet effective. > cc @spacewander to share your views. This may not work correctly in some cases, in ASCII table, the '=' symbol is behind number sequence, so if I pass param like `a1a=2&a1a=1&a=2`, it will sort as `a1a=1&a1a=2&a=2`, but I think the result `a=2&a1a=1&a1a=2` may correct. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
