diff options
| author | 2023-04-15 18:14:24 +0200 | |
|---|---|---|
| committer | 2023-04-15 18:14:24 +0200 | |
| commit | 5ec593da2c64c70c8abe124a9f11fcf6d1ada6c0 (patch) | |
| tree | a48fa40503a535de1b02dac3b6b6aadc2be23644 | |
| parent | Added entrypoint /push/subscription. (diff) | |
| download | snac2-5ec593da2c64c70c8abe124a9f11fcf6d1ada6c0.tar.gz snac2-5ec593da2c64c70c8abe124a9f11fcf6d1ada6c0.tar.xz snac2-5ec593da2c64c70c8abe124a9f11fcf6d1ada6c0.zip | |
Force failure in Mastodon API before it gets to a crash-on-startup situation.
| -rw-r--r-- | mastoapi.c | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -301,13 +301,17 @@ int oauth_post_handler(const xs_dict *req, const char *q_path, | |||
| 301 | } | 301 | } |
| 302 | else | 302 | else |
| 303 | if (strcmp(cmd, "/token") == 0) { | 303 | if (strcmp(cmd, "/token") == 0) { |
| 304 | xs *wrk = NULL; | ||
| 304 | const char *gtype = xs_dict_get(args, "grant_type"); | 305 | const char *gtype = xs_dict_get(args, "grant_type"); |
| 305 | const char *code = xs_dict_get(args, "code"); | 306 | const char *code = xs_dict_get(args, "code"); |
| 306 | const char *cid = xs_dict_get(args, "client_id"); | 307 | const char *cid = xs_dict_get(args, "client_id"); |
| 307 | const char *csec = xs_dict_get(args, "client_secret"); | 308 | const char *csec = xs_dict_get(args, "client_secret"); |
| 308 | const char *ruri = xs_dict_get(args, "redirect_uri"); | 309 | const char *ruri = xs_dict_get(args, "redirect_uri"); |
| 309 | const char *scope = xs_dict_get(args, "scope"); | 310 | /* FIXME: this 'scope' parameter is mandatory for the official Mastodon API, |
| 310 | xs *wrk = NULL; | 311 | but if it's enabled, it makes it crash after some more steps, which |
| 312 | is FAR WORSE */ | ||
| 313 | // const char *scope = xs_dict_get(args, "scope"); | ||
| 314 | const char *scope = NULL; | ||
| 311 | 315 | ||
| 312 | /* no client_secret? check if it's inside an authorization header | 316 | /* no client_secret? check if it's inside an authorization header |
| 313 | (AndStatus does it this way) */ | 317 | (AndStatus does it this way) */ |