1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00
Commit Graph

4604 Commits

Author SHA1 Message Date
William Wennerström
ac03037847
Rework url to filename 2020-12-06 17:02:09 +01:00
William Wennerström
1d2c0a8836
Move unique_filename_from_url functions to common 2020-12-04 16:13:13 +01:00
William Wennerström
3a6597ee29
Refactor for threaded external executable for built-in download methods 2020-12-03 16:54:06 +01:00
William Wennerström
1bb6cecee6
Fix stubs and move some tests to http_common 2020-11-16 21:58:10 +01:00
William Wennerström
be62b446f7
Add stubs 2020-11-16 21:58:10 +01:00
William Wennerström
ab83afe21b
Switch to g_strerror 2020-11-16 21:58:09 +01:00
William Wennerström
3d344cfeaa
Move common http tool code to http_common 2020-11-16 21:58:09 +01:00
William Wennerström
7a1eb730b1
Explicitly clear fragment from HTTP URL 2020-11-16 21:58:09 +01:00
William Wennerström
62cbad1c6e
Add I/O error handling and use filenames instead of file descriptors 2020-11-16 21:58:09 +01:00
William Wennerström
73f313b921
Refactor OMEMO download into AESGCMDownload tool 2020-11-16 21:58:09 +01:00
William Wennerström
fb002a59b6
Use fallback method when /executable urlsave is unset 2020-11-16 21:58:09 +01:00
William Wennerström
4711fc62a3
Run make format on rebase 2020-11-16 21:58:09 +01:00
William Wennerström
a0cf0844ab
Remove unsafe Conent-Disposition inferring 2020-11-16 21:58:09 +01:00
William Wennerström
eebf54c859
Infer filename from content-disposition or URL
The Content-Disposition inferring is probably a bad idea security wise,
so I am going to remove it.
2020-11-16 21:58:09 +01:00
William Wennerström
9499df6585
Add http_download tool 2020-11-16 21:58:09 +01:00
William Wennerström
362c6973de
Wording 2020-11-16 21:58:08 +01:00
William Wennerström
04bfa23ead
Remove temporary ciphertext file when finished 2020-11-16 21:58:08 +01:00
William Wennerström
9d58472c8c
Remove /omemo sendfile 2020-11-16 21:58:08 +01:00
William Wennerström
f4ab1ca9e7
Move file encryption function to public header 2020-11-16 21:58:08 +01:00
William Wennerström
e98644f631
Add guards for OMEMO 2020-11-16 21:58:08 +01:00
William Wennerström
fc6136ddf0
Remove unused #define's and move URL scheme define to omemo/crypto.h 2020-11-16 21:58:08 +01:00
William Wennerström
d5b1dc0eb6
Move setup for AESGCM to omemo/crypto 2020-11-16 21:58:08 +01:00
William Wennerström
e9d5875782
Reformat HTTP get URL to AESGCM scheme 2020-11-16 21:58:08 +01:00
William Wennerström
39c3290613
Refactor to use file stream 2020-11-16 21:58:08 +01:00
William Wennerström
3370418d71
Initial /sendfile OMEMO encryption 2020-11-16 21:58:07 +01:00
Michael Vetter
35aecd425f Declare counter var inside loop
We require c99/gnu99 anyways.
2020-11-09 11:33:33 +01:00
Michael Vetter
304f63f204 Dont initialize i twice in accounts_get_account() 2020-11-05 09:38:57 +01:00
Michael Vetter
e9a946f75e Simplify _correction_autocomplete() 2020-11-05 09:35:54 +01:00
Michael Vetter
711ea4887f Simplify _executable_autocomplete() 2020-11-05 09:35:19 +01:00
Michael Vetter
38978b153b Simplify _lastactivity_autocomplete() 2020-11-05 09:34:56 +01:00
Michael Vetter
23e9d23a3e Simplify _who_autocomplete() 2020-11-05 09:33:03 +01:00
Michael Vetter
70c8fd4657 Simplify _tray_autocomplete() 2020-11-05 09:32:25 +01:00
Michael Vetter
36e0bfde46 Simplify _sub_autocomplete() 2020-11-05 09:31:59 +01:00
Michael Vetter
c65f03884e Simplify cmd_ac_complete_filepath() 2020-11-05 09:27:37 +01:00
Michael Vetter
2184e92c19 Simplify cmd_ac_complete() 2020-11-05 09:24:17 +01:00
Michael Vetter
3d307fe341 Get rid of str_contains()
We can use strchr() here.
2020-11-02 18:52:25 +01:00
Michael Vetter
3b3c9bf4d5 Print all error stanzas
Regards https://github.com/profanity-im/profanity/issues/1435

So far we didn't print the error if it contained `<error
type="cancel">`. It appears that the code always thought this is a
service-not-available (so one is either blocked or the account doesn't
exist) and printed `Recipient not found`.

But there can be other errors as well. Like in above mentioned issue
`not-allowed`.

Let's just print the text.

In case of the cancel type we still remove the jid from the chat
sessions. I'm not entirely sure whether this needs to be done in other
cases too.
2020-10-30 15:09:40 +01:00
DebXWoody
15f45fcfe1 Fixed Date format for MAM request
Using g_date_time_new_now_utc instead of g_date_time_new_now_local
Using g_date_time_format(timestamp, "%FT%TZ") instead of "%FT%T%:::z"

Edit:
DebXWoody created this patch because ejabberd returned an error with the
old date format.
2020-10-28 09:06:49 +01:00
Dmitry Podgorny
3a86b997ca xmpp/bookmark: don't use uninitialised field
When a bookmark is created with '/bookmark add' command,
ext_gajim_minimize remains uninitialised in new bookmark object and
is read further in _send_bookmarks().

Initialise the field with 0.

Fixes #1432.
2020-10-19 00:00:00 +03:00
Philipp Klaus Krause
6a276e74e3 Since the string from strerror should never be modified, use const. 2020-10-14 09:52:26 +02:00
Dmitry Podgorny
64df8630d4 Fix use-after-free which is introduced in cons_alert()
Commit f12161f fixes memory leak, but introduces use-after-free issue.
Allocate new memory for win_name with g_strdup() since it is freed with
g_free() later.
2020-10-09 13:39:52 +03:00
Michael Vetter
315863575b
Merge pull request #1426 from profanity-im/cleanup/newlibs
Cleanup/newlibs
2020-10-09 09:41:34 +02:00
Michael Vetter
4d4c094b5f Enable _handle_ox_chat() payload/body decryption
This part of the code was waiting for xmpp_stanza_new_from_string() from
libstrophe 0.10.0.
2020-10-09 09:38:47 +02:00
Michael Vetter
f12161f190 Fix memleak in cons_alert()
Close https://github.com/profanity-im/profanity/issues/1427
2020-10-07 22:50:24 +02:00
Michael Vetter
7f5169c2e9 Use g_date_time_format_iso8601()
This partly reverts d3a387a0ec.

For proanity 0.9.x we still wanted to support older glib versions so
that we can be packaged for various linux distros.

Now with 0.10 we want to move on.
2020-09-30 19:43:58 +02:00
Michael Vetter
17b1b431f5 Replace stanza_get_child_by_name_and_ns with xmpp_stanza_get_child_by_name_and_ns
Replace our own stanza_get_child_by_name_and_ns() with the upstreamed
xmpp_stanza_get_child_by_name_and_ns() provided by the new
libstrophe/libmesode 0.10.0.
2020-09-30 19:41:08 +02:00
Michael Vetter
0a9200e268 Require libstrophe/libmesode 0.10.0 2020-09-30 19:30:40 +02:00
nia
ce67753423 Avoid passing NULL pointers to curses functions.
This allows profanity to work without segfaulting from NULL
pointer dereferences when used with NetBSD libcurses.

Basic functionality was tested, there may be more NULL pointer
issues hiding.
2020-09-04 12:59:20 +02:00
nia
52e9be4abc Basic support for building on NetBSD.
- Add NetBSD as a recognized platform without -ldl.
- Allow building with NetBSD libcurses instead of ncurses.
- Portability to NetBSD sh - use POSIX '=' instead of '=='.
2020-09-04 12:55:20 +02:00
Dmitry Podgorny
7553676b40 Fix memory leak in _handle_chat()
jid_create() for attribute "to" was called twice and the 1st object was
lost.
2020-08-07 00:47:45 +03:00