aboutsummaryrefslogtreecommitdiffstats
path: root/lib/oauth.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-26 23:47:35 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-26 23:47:35 +0100
commit78a2f1e4ac9aeb2c041059eb7a9578d34bd60d50 (patch)
tree3a8f4f3e923164bd1308f9d85be60aa7563294ac /lib/oauth.c
parentc42e8b907817fc76df4dc3b48d85858555102654 (diff)
Escaping in oauth_nonce(). Not sure if the escaping is entirely right ATM...
:-(
Diffstat (limited to 'lib/oauth.c')
-rw-r--r--lib/oauth.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/oauth.c b/lib/oauth.c
index 7f60f4f5..9a372082 100644
--- a/lib/oauth.c
+++ b/lib/oauth.c
@@ -107,9 +107,14 @@ static char *oauth_sign( const char *method, const char *url,
static char *oauth_nonce()
{
unsigned char bytes[9];
+ char *ret;
random_bytes( bytes, sizeof( bytes ) );
- return base64_encode( bytes, sizeof( bytes ) );
+ ret = base64_encode( bytes, sizeof( bytes ) );
+ ret = g_realloc( ret, strlen( ret ) * 3 + 1 );
+ http_encode( ret );
+
+ return ret;
}
void oauth_params_add( GSList **params, const char *key, const char *value )