aboutsummaryrefslogtreecommitdiffstats
path: root/lib/oauth.c
Commit message (Collapse)AuthorAgeLines
* oauth: fix use-after-free of the ->next of the listdequis2015-04-24-2/+3
| | | | | | | Third time's the charm. Previous attempt fixed something and broke something else. Whatever. Definitely valgrind clean this time.
* Refactor oauth_params_del to fix use-after-free that i introduceddequis2015-02-28-8/+7
| | | | | | | Yeah ok that was dumb. This is essentially just using a 'data' variable instead of 'l->data', but i went ahead and cleaned up the function.
* coverity: Fix some (harmless?) use-after-free with g_slist_remove()dequis2015-02-22-1/+1
| | | | | | | These were passing a pointer to a variable right after it was g_free()'d They are most likely harmless as g_slist_remove() probably just needs the pointer location, but fixing it anyway.
* Reindent everything to K&R style with tabsIndent2015-02-20-254/+253
| | | | | | | Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
* Use glib's GChecksum for md5/sha1dequis2015-01-31-2/+2
| | | | | | | | | | | | | | | | | | | This changes behavior slightly: - md5_init()/sha1_init() allocate a GChecksum - md5_finish()/sha1_finish() close and free() it - md5_digest_keep() was added (no sha1 equivalent needed) And yes, glib has this concept of "closing" the GChecksum, which means it can't be used anymore after g_checksum_get_digest(). jabber_cache_add() actually seems to need to do that to generate some random-ish values, so i kept that working by adding a md5_digest_keep() function that copies the GChecksum before it gets closed GChecksum was introduced in glib 2.16, so the configure script version was bumped. We were already depending on glib 2.16 accidentally (some post-3.2.2 code uses GHashTableIter)
* Use glib functions for base64 decoding/encodingdequis2014-11-24-6/+1
| | | | | | | | | | | | This fixes several coverity warnings about 'tainted data index sink' and a fixme about thread safety in the old base64_decode implementation. Had to adapt the code that used base64_encode_real: - oauth.c: different character set order, but it's for the nonce so it doesn't matter - libyahoo2.c: used as part of the auth, changes "+/=" into "._-". Fixed by encoding first the usual way through glib, then replacing.
* Debian bug #764181: Accidentally had an LGPL header in a bunch of files.Wilmer van der Gaast2014-10-17-10/+10
| | | | | | Replaced them with GPL headers where possible. OSCAR and Twitter modules can't be relicenced though, so add an LGPL blurb to debian/copyright.
* Add better handling of HTTP/1.1 and/or keepalive connections. This shouldWilmer van der Gaast2013-06-09-1/+0
| | | | | | let me close #641, and more importantly, prepares the Twitter module for an upcoming API change. https://dev.twitter.com/blog/deprecating-http-1.0-streaming-api
* Fixed a bug that probably (can't test this now since it's down) broke OAuthWilmer van der Gaast2011-12-21-0/+2
| | | | | setup for identi.ca. Turning on oauth for identi.ca accounts by default now.
* Use sha1_hmac() instead of reimplementing the algorithm in oauth_sign().Wilmer van der Gaast2011-12-21-42/+9
|
* Give a list of SASL mechanisms supported by a server when reporting we don'tWilmer van der Gaast2011-12-19-1/+1
| | | | | support any of them.
* Facebook OAuth2 should now be fully usable.Wilmer van der Gaast2011-12-19-0/+6
|
* OAuth code cleanup.Wilmer van der Gaast2011-07-31-0/+3
|
* Export oauth_params_parse().Wilmer van der Gaast2011-07-31-1/+1
|
* Send Connection: close headers so webservers won't try keepalive connectionsWilmer van der Gaast2011-04-18-0/+1
| | | | | which http_client really can't deal with.
* Tweaks to allow authenticating to identi.ca with OAuth. Doesn't seem to workWilmer van der Gaast2011-03-27-2/+6
| | | | | | | completely for whatever the reason may be (invalid signature). I give up for now. Stuff does actually work if you generate access tokens using different software so BitlBee's definitely able to generate good signatures.
* Twitter: Warn the user if the OAuth username and the configured usernameWilmer van der Gaast2011-03-07-6/+5
| | | | | | don't match. This is not a real problem but can be confusing if you don't expect it.
* OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen <dam@opencsw.org>Wilmer van der Gaast2010-08-07-1/+1
| | | | | with some changes.
* OAuth sanity fix: Twitter-specific stuff should *not* be in lib/oauth.c.Wilmer van der Gaast2010-05-02-52/+66
|\ | | | | | | | | Somewhat intrusive, should've done this right immediately. :-/
| * Save the credentials again.Wilmer van der Gaast2010-05-01-0/+27
| |
| * Cleaned up OAuth stuff: consumer key/secret should *not* be in lib/oauth.c.Wilmer van der Gaast2010-05-01-52/+39
|/ | | | | | Keep it in the Twitter module, and use the oauth_info struct through the whole session to keep all this together.
* NULL-initialize two vars that weren't and should.Wilmer van der Gaast2010-04-30-1/+1
|
* Valgrind-clean now. And decent handling of errors (wrong PIN).Wilmer van der Gaast2010-04-27-1/+3
|
* Valgrind cleanup.Wilmer van der Gaast2010-04-27-6/+34
|
* The escaping, I fixed it for you. More expensive code this way and most ofWilmer van der Gaast2010-04-27-18/+23
| | | | | the vars don't need escaping. But this shouldn't be so fragile anymore.
* Escaping in oauth_nonce(). Not sure if the escaping is entirely right ATM...Wilmer van der Gaast2010-04-26-1/+6
| | | | | :-(
* OAuth, it lives!Wilmer van der Gaast2010-04-26-1/+13
|
* Twitter module now generates authorize URLs.Wilmer van der Gaast2010-04-26-4/+4
|
* Moving two public OAuth functions into the header file.Wilmer van der Gaast2010-04-26-16/+1
|
* Successfully posted a tweet!Wilmer van der Gaast2010-04-26-17/+23
| | | | | | | | | | Twitter's tricky. It returns vars (user_id, screen_name) in the access token that, the way I read the spec, should be included in all subsequent queries. However, stuff only started to work when I dropped those vars. This code's definitely not pretty ATM. Need to clean up now that it actually works.
* Added a function that generates an OAuth Authorization: HTTP header.Wilmer van der Gaast2010-04-26-13/+79
|
* oauth_access_token() added. I managed to increase the counter onWilmer van der Gaast2010-04-25-4/+22
| | | | | http://twitter.com/oauth_clients/details/127170 . \o/
* Some HTTP stuff. Via gdb I can make this request a token.Wilmer van der Gaast2010-04-25-6/+212
|
* Code to calculate OAuth signatures. I hope that after wrapping my mindWilmer van der Gaast2010-04-25-0/+106
around all of this the rest is going to be easier..