Opened at 2010-07-15T09:48:06Z
Closed at 2010-07-29T09:02:36Z
#651 closed defect (fixed)
HTTP Error 401 Unauthorized generated when I post a message with french characters
Reported by: | Owned by: | geert | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Version: | devel | |
Keywords: | Cc: | ||
IRC client+version: | weechat 0.2.3 | Operating System: | Public server |
OS version/distro: |
Description
I'm using the testing.bitlbee.org server with a twitter account. When I post messages with french characters (for example é or à), I got this error:
twitter - Error: HTTP error: 401 Unauthorized (Incorrect signature)
And my message is not posted.
Attachments (0)
Change History (4)
comment:1 Changed at 2010-07-28T23:29:10Z by
comment:2 Changed at 2010-07-29T07:34:00Z by
Huh. It does work for me when I test it on my laptop, but indeed broke on my normal setup. Smells like charset configuration issues.
comment:3 Changed at 2010-07-29T07:49:56Z by
Priority: | blocker → major |
---|
Ah, I think I found it.
This happens to me on my main machine since it has locale set to latin1. Apparently isalpha() returns 1 for more than just A-Za-z. The result is that only one of the two bytes of most Unicode sequences gets HTTP-encoded. OAuth is very sensitive to this, so there we have our failure. I'll fix it.
BTW, this is *absolutely* not a blocker bug, critical and blocker eather mean "feature *completely* unusable" or, preferably, "so insecure I would rather run old versions of Sendmail, BIND and a thousand PHP apps".
comment:4 Changed at 2010-07-29T09:02:36Z by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed by changeset:devel,628.
This problem started when setlocale() was added to unix.c. Note that this problem only happens (I think) on machines that have a non-UTF-8 charset set as their system default. People who are fully on UTF-8 (and not just internally in BitlBee) should not have this issue at all.
And with this revision, nobody will. :-) I'll run the deb updater now and also roll this out to testing.bitlbee.org.
Hmm. Odd.
I found this one: http://groups.google.com/group/twitter-development-talk/browse_thread/thread/ef11efdd0a9cf194/6950ce9721a48609#6950ce9721a48609
Odd thing is, I think you said this used to work? Maybe with an older BitlBee though, one that didn't use OAuth yet.
Anyway, I think BitlBee already encodes chars the way that document describes. Let's see..