aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-05-22 17:19:44 +0200
committergrunfink <grunfink@comam.es>2026-05-22 17:19:44 +0200
commit75a06909e2b1695db3be226878b89abed255766c (patch)
tree02aeb25e567a011c2bfcc6754d30e944979085fd
parent478672a2fe9e0dec9f5a643e04efbca49bcdd195 (diff)
parent8df47c39b9666269b276c94d17e7e418a26ce2f1 (diff)
Merge branch 'master' of grunfink-codeberg:grunfink/snac2
-rw-r--r--mastoapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 1ddcdc4..1f4928e 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -355,6 +355,7 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
else
if (strcmp(cmd, "/token") == 0) { /** **/
xs *wrk = NULL;
+ xs *codewrk = NULL;
const char *gtype = xs_dict_get(args, "grant_type");
const char *code = xs_dict_get(args, "code");
const char *cid = xs_dict_get(args, "client_id");
@@ -387,7 +388,7 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
I'm not sure of the impacts of this right now, but Subway Tooter does not
provide a code so one must be generated */
if (xs_is_null(code)){
- code = random_str();
+ code = codewrk = random_str();
}
if (gtype && code && cid && csec && ruri) {
xs *app = app_get(cid);