diff options
author | William Wennerström <william@wstrm.dev> | 2020-07-21 09:48:22 +0200 |
---|---|---|
committer | William Wennerström <william@wstrm.dev> | 2020-11-16 21:58:09 +0100 |
commit | 7a1eb730b1fff7b49def2b86730642cbe0f74d41 (patch) | |
tree | 44f7700f065b2121e2f6e94eeef4113a93aaeb48 /src | |
parent | 62cbad1c6e43c64c02d61b732f2f25d4c8611403 (diff) | |
download | profani-tty-7a1eb730b1fff7b49def2b86730642cbe0f74d41.tar.gz |
Explicitly clear fragment from HTTP URL
Diffstat (limited to 'src')
-rw-r--r-- | src/omemo/omemo.c | 6 | ||||
-rw-r--r-- | src/omemo/omemo.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c index 8b426320..2e698591 100644 --- a/src/omemo/omemo.c +++ b/src/omemo/omemo.c @@ -1767,6 +1767,12 @@ omemo_parse_aesgcm_url(const char* aesgcm_url, goto out; } + // Clear fragment from HTTPS URL as it's not required for download. + ret = curl_url_set(url, CURLUPART_FRAGMENT, NULL, curl_flags); + if (ret) { + goto out; + } + ret = curl_url_set(url, CURLUPART_SCHEME, "https", curl_flags); if (ret) { goto out; diff --git a/src/omemo/omemo.h b/src/omemo/omemo.h index d90f11cf..b8d84498 100644 --- a/src/omemo/omemo.h +++ b/src/omemo/omemo.h @@ -101,5 +101,6 @@ char* omemo_on_message_send(ProfWin* win, const char* const message, gboolean re char* omemo_on_message_recv(const char* const from, uint32_t sid, const unsigned char* const iv, size_t iv_len, GList* keys, const unsigned char* const payload, size_t payload_len, gboolean muc, gboolean* trusted); char* omemo_encrypt_file(FILE* in, FILE* out, off_t file_size, int* gcry_res); -gcry_error_t omemo_decrypt_file(FILE* in, FILE* out, off_t file_size, const char* fragment); void omemo_free(void* a); +gcry_error_t omemo_decrypt_file(FILE* in, FILE* out, off_t file_size, const char* fragment); +void omemo_free(void* a); int omemo_parse_aesgcm_url(const char* aesgcm_url, char** https_url, char** fragment); |