mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +00:00
Better redirection URL building in oauth_post_handler().
This commit is contained in:
parent
c9df6707ab
commit
81cf1e21a6
1 changed files with 5 additions and 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue