diff options
author | default <nobody@localhost> | 2024-04-14 19:24:06 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-04-14 19:24:06 +0200 |
commit | 81cf1e21a646568323681df2763e66f933bee48f (patch) | |
tree | dee4bdcf54e6c0d0bfea0f624075f60c4094a0c0 /mastoapi.c | |
parent | c9df6707abc8a8d2b7815f5210cf3667be6fb9b1 (diff) |
Better redirection URL building in oauth_post_handler().
Diffstat (limited to 'mastoapi.c')
-rw-r--r-- | mastoapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -289,7 +289,11 @@ int oauth_post_handler(const xs_dict *req, const char *q_path, *body = xs_dup(code); } else { - *body = xs_fmt("%s?code=%s", redir, code); + if (xs_str_in(redir, "?")) + *body = xs_fmt("%s&code=%s", redir, code); + else + *body = xs_fmt("%s?code=%s", redir, code); + status = 303; } |