summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wood <matthew.d.wood@intel.com>2009-04-15 11:10:04 +0100
committerRoss Burton <ross@linux.intel.com>2009-04-15 11:16:28 +0100
commitef838c461e41dd3941d18b92235c8bb697a9a6f0 (patch)
treed609c406ad3d134f126deb8a797b1388927dd999
parentdc2e8aace75e5083a01a7cb5e8463c02a66e093c (diff)
Correctly encode the plaintext signature
-rw-r--r--rest/oauth-proxy-call.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/rest/oauth-proxy-call.c b/rest/oauth-proxy-call.c
index 2015bfc..b770edb 100644
--- a/rest/oauth-proxy-call.c
+++ b/rest/oauth-proxy-call.c
@@ -35,7 +35,18 @@ G_DEFINE_TYPE (OAuthProxyCall, oauth_proxy_call, REST_TYPE_PROXY_CALL)
static char *
sign_plaintext (OAuthProxyPrivate *priv)
{
- return g_strdup_printf ("%s&%s", priv->consumer_secret, priv->token_secret ?: "");
+ char *cs;
+ char *ts;
+ char *rv;
+
+ cs = OAUTH_ENCODE_STRING (priv->consumer_secret);
+ ts = OAUTH_ENCODE_STRING (priv->token_secret ? priv->token_secret : "");
+ rv = g_strconcat (cs, "&", ts, NULL);
+
+ g_free (cs);
+ g_free (ts);
+
+ return rv;
}
static char *