Commit Graph

4 Commits

Author SHA1 Message Date
Philipp Wolfer
870e6afbe7 PICARD-2882: Support OAuth2 PKCE 2024-05-03 16:43:36 +02:00
Laurent Monin
53ec0e066f Add test for = encoding
Suggested by phw
2022-01-06 16:07:50 +01:00
Laurent Monin
8b787482ff _query_data(): Use urllib.parse.urlencode() instead of QUrl/QUrlQuery
Note: previously spaces weren't encoded, with this change they are (as plus) which is more conform to expected format for application/x-www-form-urlencoded
Actually this was a bug in previous version, as addQueryItem() didn't encode spaces as they should
See https://doc.qt.io/qt-5/qurlquery.html#addQueryItem
"This method does not treat spaces (ASCII 0x20) and plus ("+") signs as the same, like HTML forms do. If you need spaces to be represented as plus signs, use actual plus signs."

It wasn't an issue because none of passed data should contain spaces in our current code
2022-01-06 14:41:09 +01:00
Laurent Monin
d1de2a7208 _query_data(): skip empty key and add a test 2022-01-06 14:16:11 +01:00