diff options
| author | grunfink <grunfink@noreply.codeberg.org> | 2024-09-16 07:28:28 +0000 |
|---|---|---|
| committer | grunfink <grunfink@noreply.codeberg.org> | 2024-09-16 07:28:28 +0000 |
| commit | a09e5052ddd8df423332ada814e743893878e0b9 (patch) | |
| tree | 732e4a923354f64614991c46fe264b7e0e78ef1e /mastoapi.c | |
| parent | b3c00cc09871433882e97a9f5d07882dd1bcfec8 (diff) | |
| parent | ba5cbb6d828165a43826c6afdd71fa2edbdca302 (diff) | |
Merge pull request 'URL decode data after splitting the arguments' (#196) from ndagestad/snac2:mastodon_login into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/196
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -262,8 +262,7 @@ int oauth_post_handler(const xs_dict *req, const char *q_path, } else if (i_ctype && xs_startswith(i_ctype, "application/x-www-form-urlencoded") && payload) { - xs *upl = xs_url_dec(payload); - args = xs_url_vars(upl); + args = xs_url_vars(payload); } else args = xs_dup(xs_dict_get(req, "p_vars")); @@ -2361,8 +2360,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, { // Some apps send form data instead of json so we should cater for those if (!xs_is_null(payload)) { - xs *upl = xs_url_dec(payload); - args = xs_url_vars(upl); + args = xs_url_vars(payload); } } else @@ -2959,8 +2957,7 @@ int mastoapi_delete_handler(const xs_dict *req, const char *q_path, { // Some apps send form data instead of json so we should cater for those if (!xs_is_null(payload)) { - xs *upl = xs_url_dec(payload); - args = xs_url_vars(upl); + args = xs_url_vars(payload); } } else @@ -3194,8 +3191,7 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path, { // Some apps send form data instead of json so we should cater for those if (!xs_is_null(payload)) { - xs *upl = xs_url_dec(payload); - args = xs_url_vars(upl); + args = xs_url_vars(payload); } } else |