The oauth_signature in the Authorization header is not encoded
Note the generated oauth_signature param: GgLIi0W5+prHjxJHTLJuXKQZemxnJEdThw0y0nqQjFaDOwfgQqHw8C/3JReZ0AffrBtI2rs6I1xQk74hMOPoiAsQsIPO7pQ7vZlEk1nO3nO6uXebZ/tu2k0KLpwqYzBULAnuVZuhfSQG7oEI3qGbtI5u/tAv4P64zLY/vl36NB+KSYqONPBx04T12mk/rk1Xswh3aVEtXzycOvRHB+/3ydavXgGzHSg9WpzkyyQ4YmJajGcNwVZWgJGNl9ectr9KBrL6PmxHyS1fRI/aabEH6uFy3gGk9d4IMwm1hsU+Pwq0pS3AnBZpo26YpwVMDmyaoq5GmBZGUFONOiPNgQAwAg==
Expected behavior
The gateway accepted oauth_signature as computed by the oauth1-signer-java: GgLIi0W5%2BprHjxJHTLJuXKQZemxnJEdThw0y0nqQjFaDOwfgQqHw8C%2F3JReZ0AffrBtI2rs6I1xQk74hMOPoiAsQsIPO7pQ7vZlEk1nO3nO6uXebZ%2Ftu2k0KLpwqYzBULAnuVZuhfSQG7oEI3qGbtI5u%2FtAv4P64zLY%2Fvl36NB%2BKSYqONPBx04T12mk%2Frk1Xswh3aVEtXzycOvRHB%2B%2F3ydavXgGzHSg9WpzkyyQ4YmJajGcNwVZWgJGNl9ectr9KBrL6PmxHyS1fRI%2FaabEH6uFy3gGk9d4IMwm1hsU%2BPwq0pS3AnBZpo26YpwVMDmyaoq5GmBZGUFONOiPNgQAwAg%3D%3D
Bug Report Checklist
PR opened to fix the issue: https://github.com/Mastercard/oauth1-signer-python/pull/34
Description Requests are rejected when signed with the python library
mastercard-oauth1-signer
versions 1.2.0 and 1.3.0. Theoauth_signature
is not encoded as per https://datatracker.ietf.org/doc/html/rfc3986#section-2.1.See the OAuth#getAuthorizationHeader implementation in oauth1-signer-java as reference:
To Reproduce
1.2.0
or1.3.0
oauth_signature
in the Authorization header is not encodedoauth_signature
param:GgLIi0W5+prHjxJHTLJuXKQZemxnJEdThw0y0nqQjFaDOwfgQqHw8C/3JReZ0AffrBtI2rs6I1xQk74hMOPoiAsQsIPO7pQ7vZlEk1nO3nO6uXebZ/tu2k0KLpwqYzBULAnuVZuhfSQG7oEI3qGbtI5u/tAv4P64zLY/vl36NB+KSYqONPBx04T12mk/rk1Xswh3aVEtXzycOvRHB+/3ydavXgGzHSg9WpzkyyQ4YmJajGcNwVZWgJGNl9ectr9KBrL6PmxHyS1fRI/aabEH6uFy3gGk9d4IMwm1hsU+Pwq0pS3AnBZpo26YpwVMDmyaoq5GmBZGUFONOiPNgQAwAg==
Expected behavior
oauth_signature
as computed by the oauth1-signer-java:GgLIi0W5%2BprHjxJHTLJuXKQZemxnJEdThw0y0nqQjFaDOwfgQqHw8C%2F3JReZ0AffrBtI2rs6I1xQk74hMOPoiAsQsIPO7pQ7vZlEk1nO3nO6uXebZ%2Ftu2k0KLpwqYzBULAnuVZuhfSQG7oEI3qGbtI5u%2FtAv4P64zLY%2Fvl36NB%2BKSYqONPBx04T12mk%2Frk1Xswh3aVEtXzycOvRHB%2B%2F3ydavXgGzHSg9WpzkyyQ4YmJajGcNwVZWgJGNl9ectr9KBrL6PmxHyS1fRI%2FaabEH6uFy3gGk9d4IMwm1hsU%2BPwq0pS3AnBZpo26YpwVMDmyaoq5GmBZGUFONOiPNgQAwAg%3D%3D