bytespider / jsOAuth

JavaScript implimentation of the OAuth protocol. Currently supports version 1.0 (RFC5849) of the specification. Node.js & CommonJS compatible.
http://bytespider.github.com/jsOAuth/
MIT License
556 stars 108 forks source link

Signature string param sorting #25

Closed k7d closed 12 years ago

k7d commented 12 years ago

According to Oauth spec http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2:

The parameters are sorted by name, using ascending byte value ordering. If two or more parameters share the same name, they are sorted by their value.

Currently this fails in the following scenario (param1-2 will be before param1):

param1=x param1-2=y

This pull requests contains unit-test & fix.

bytespider commented 12 years ago

Hi thanks for your pull request. Could you re-indent the files to their previous indentations? The build process merges files together and its quite useful to have a properly indented resultant file. On top of that I can't see the changes you've made as the diff is full of indentation diffs.

k7d commented 12 years ago

Sorry, I messed up the second commit. Here's proper: b9edeb63d59d686df631e05f72e54bf84a869403

bytespider commented 12 years ago

I've merged the commits. Things got a little messy, I'm not that great with Git. Building the library now