[FIX] URL encode filenames

This commit is contained in:
LDA 2025-06-22 14:00:12 +02:00
commit e331d110c7

View file

@ -1,6 +1,7 @@
#include <Parsee.h>
#include <Cytoplasm/Memory.h>
#include <Cytoplasm/Http.h>
#include <Cytoplasm/Json.h>
#include <Cytoplasm/Util.h>
#include <Cytoplasm/Str.h>
@ -725,12 +726,14 @@ ParseeToUnauth(ParseeData *data, char *mxc, char *filename)
}
else
{
char *encoded = HttpUrlEncode(filename);
l = snprintf(NULL, 0,
PATF,
data->config->media_base,
url->host, url->path, filename,
url->host, url->path, encoded,
hmac
);
Free(encoded);
}
ret = Malloc(l + 3);
if (!filename)