Better redirection URL building in oauth_post_handler().

This commit is contained in:
default 2024-04-14 19:24:06 +02:00
parent c9df6707ab
commit 81cf1e21a6

View file

@ -289,7 +289,11 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
*body = xs_dup(code); *body = xs_dup(code);
} }
else { else {
if (xs_str_in(redir, "?"))
*body = xs_fmt("%s&code=%s", redir, code);
else
*body = xs_fmt("%s?code=%s", redir, code); *body = xs_fmt("%s?code=%s", redir, code);
status = 303; status = 303;
} }