commit 5ec593d
default
·
2023-04-15 16:14:24 +0000 UTC
parent 512058b
Force failure in Mastodon API before it gets to a crash-on-startup situation.
1 files changed,
+6,
-2
+6,
-2
1@@ -301,13 +301,17 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
2 }
3 else
4 if (strcmp(cmd, "/token") == 0) {
5+ xs *wrk = NULL;
6 const char *gtype = xs_dict_get(args, "grant_type");
7 const char *code = xs_dict_get(args, "code");
8 const char *cid = xs_dict_get(args, "client_id");
9 const char *csec = xs_dict_get(args, "client_secret");
10 const char *ruri = xs_dict_get(args, "redirect_uri");
11- const char *scope = xs_dict_get(args, "scope");
12- xs *wrk = NULL;
13+ /* FIXME: this 'scope' parameter is mandatory for the official Mastodon API,
14+ but if it's enabled, it makes it crash after some more steps, which
15+ is FAR WORSE */
16+// const char *scope = xs_dict_get(args, "scope");
17+ const char *scope = NULL;
18
19 /* no client_secret? check if it's inside an authorization header
20 (AndStatus does it this way) */