Hi there,
I've been using the Netflix oAuth Javascript library as part of a
Firefox plugin I've extended (If you're curious:
https://addons.mozilla.org/en-US/firefox/addon/9780)

There is no contact/ownership information in the code, so I'm posting
to this group in the hope that the author, John Kristian, will read
it.

I've found a bug in the way that the uri is parsed.
If the uri includes an @ in the path, the regular expression causes it
to be included in the authority, so signature generation fails.
For example:
http://example.com/userResource/t...@test.com/authenticate

The regular expression needs a slight modification:
/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::
(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/
/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@/]*):?([^:/@]*))?@)?([^:\/?#]*)(?::
(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/

Basically I added a / to the character class that scans for the @
symbol, ie [^:@/]

If anyone wants to write a nice web-based regular expression debugger,
the world will be forever in your debt :)
Thanks John for the great library!
Dirk

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to oauth@googlegroups.com
To unsubscribe from this group, send email to oauth+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/oauth?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to