-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I use OhhAuth.calculateSignature inside an interceptor, and I've come across a bad edge case. If the path of the request needs to be percent encoded (say, for a space) the signature generated will be invalid as it will take the path from the URL directly, causing it to grab the path without the encoding done to it.
An example of a URL this fails on: https://api-http2.tumblr.com/v2/hubs/random%20tag/timeline.
I've fixed this locally on my end by sticking .addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)! to the end of self.path on line 306 in oAuthBaseURL().
Just wanted to bring this to your attention, but didn't create a PR if you've got a better way of doing this that's more to spec or something (I'm very bodgy with my Swift code)