aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlibek Omarov #SupportRMS <a1ba.omarov@gmail.com>2021-07-29 02:16:20 +0300
committerGitHub <noreply@github.com>2021-07-29 02:16:20 +0300
commitab545a414fd866b9fa0d103b3aab868ee542e81c (patch)
treebf81f509f391e898058e38f988a47271f659f0c9
parent180bcfb9ae5991166eeb465cbd43a83bf8d4b828 (diff)
downloaddemiurge-ab545a414fd866b9fa0d103b3aab868ee542e81c.tar.gz
demiurge-ab545a414fd866b9fa0d103b3aab868ee542e81c.zip
login: url encode spaces
-rw-r--r--src/login.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/login.c b/src/login.c
index e60b1f0..d99cf36 100644
--- a/src/login.c
+++ b/src/login.c
@@ -80,7 +80,7 @@ setup()
curl_easy_setopt(curl,
CURLOPT_POSTFIELDS,
"client_name=demiurge&redirect_uris=urn:ietf:wg:oauth:2."
- "0:oob&scope=read write follow");
+ "0:oob&scope=read+write+follow");
curl_easy_perform(curl);
curl_easy_cleanup(curl);
@@ -97,7 +97,7 @@ setup()
const char *client_secret = json_object_get_string(json_client_secret);
char *fmt = "%s%sresonse_type=code&client_id=%s&redirect_uri=urn:ietf:wg:"
- "oauth:2.0:oob&force_login&scope=read write follow";
+ "oauth:2.0:oob&force_login&scope=read+write+follow";
api_url = "/oauth/authorize?";
free(post_url);
@@ -114,7 +114,7 @@ setup()
char *access_token_fmt =
"client_id=%s&client_secret=%s&redirect_uri=urn:ietf:wg:oauth:2.0:"
- "oob&grant_type=authorization_code&code=%s&scope=read write follow";
+ "oob&grant_type=authorization_code&code=%s&scope=read+write+follow";
api_url = "/oauth/token";
char *post_token_url = NULL;