diff options
| author | grunfink <grunfink@comam.es> | 2025-05-29 13:12:43 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-05-29 13:12:43 +0200 |
| commit | 34d85b3e1bbda2e89191026b3815dd9b6f23afcb (patch) | |
| tree | 631e216fb24ae3dd028ebb4043364de88c80d7df /html.c | |
| parent | 77b9cbe6c3064c1656fa5375f7d2d498e34a34e6 (diff) | |
mastoapi: fixed uploaded images name collision.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4362,7 +4362,7 @@ int html_post_handler(const xs_dict *req, const char *q_path, xs_rnd_buf(rnd, sizeof(rnd)); const char *ext = strrchr(fn, '.'); - xs *hash = xs_md5_hex(rnd, strlen(rnd)); + xs *hash = xs_md5_hex(rnd, sizeof(rnd)); xs *id = xs_fmt("post-%s%s", hash, ext ? ext : ""); xs *url = xs_fmt("%s/s/%s", snac.actor, id); int fo = xs_number_get(xs_list_get(attach_file, 1)); |