mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Force failure in Mastodon API before it gets to a crash-on-startup situation.
This commit is contained in:
parent
512058bbc5
commit
5ec593da2c
1 changed files with 6 additions and 2 deletions
|
@ -301,13 +301,17 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (strcmp(cmd, "/token") == 0) {
|
if (strcmp(cmd, "/token") == 0) {
|
||||||
|
xs *wrk = NULL;
|
||||||
const char *gtype = xs_dict_get(args, "grant_type");
|
const char *gtype = xs_dict_get(args, "grant_type");
|
||||||
const char *code = xs_dict_get(args, "code");
|
const char *code = xs_dict_get(args, "code");
|
||||||
const char *cid = xs_dict_get(args, "client_id");
|
const char *cid = xs_dict_get(args, "client_id");
|
||||||
const char *csec = xs_dict_get(args, "client_secret");
|
const char *csec = xs_dict_get(args, "client_secret");
|
||||||
const char *ruri = xs_dict_get(args, "redirect_uri");
|
const char *ruri = xs_dict_get(args, "redirect_uri");
|
||||||
const char *scope = xs_dict_get(args, "scope");
|
/* FIXME: this 'scope' parameter is mandatory for the official Mastodon API,
|
||||||
xs *wrk = NULL;
|
but if it's enabled, it makes it crash after some more steps, which
|
||||||
|
is FAR WORSE */
|
||||||
|
// const char *scope = xs_dict_get(args, "scope");
|
||||||
|
const char *scope = NULL;
|
||||||
|
|
||||||
/* no client_secret? check if it's inside an authorization header
|
/* no client_secret? check if it's inside an authorization header
|
||||||
(AndStatus does it this way) */
|
(AndStatus does it this way) */
|
||||||
|
|
Loading…
Reference in a new issue