about summary refs log tree commit diff stats
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* prevent segfaultSteffen Jaeckel2022-03-131-0/+3
| | | | | | | In case we're not connected yet and press Alt+c a segfault occurred since `conn.xmpp_conn` is dereferenced while it's still `NULL`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Add stat.h to editorMichael Vetter2022-03-041-0/+1
| | | | | | Fix on openbsd: `src/tools/editor.c:55:36: error: 'S_IRWXU' undeclared (first use in this function)`
* Include errno header in editor.cMichael Vetter2022-03-041-1/+2
|
* Move get_message_from_editor to appropriate file and change its keybindingMarcoPolo-PasTonMolo2022-03-032-0/+176
|
* auto-formatSteffen Jaeckel2022-02-011-1/+1
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Format code correctlyMichael Vetter2021-10-051-1/+1
|
* Fix segfault when aesgcm url isn't the expected sizeMichael Vetter2021-06-301-0/+1
| | | | | | | | Fixes the bug mentioned in https://github.com/profanity-im/profanity/issues/1478#issuecomment-794161606 The rest of https://github.com/profanity-im/profanity/issues/1478 I can't reproduce. Seems to work fine.
* http upload: use correct content typeMichael Vetter2021-06-021-1/+1
| | | | | | | | | | This bug was introduced in 1ec606540eb0f474f3d968d3566a7c56d778a367 when `g_strdup_printf` was used instead of `asprintf`. Problem discoverd by raspeguy. Mistake discovered by optmzr and Martin. Thanks to everybody involved!
* Get rid of asprintf and _GNU_SOURCE defineMichael Vetter2021-03-305-51/+49
| | | | | | | _GNU_SOURCE was even in some files where it was not needed at all (http*). Let's replace asprintf() with g_strdup_printf().
* Add config.h in files were it was missingMichael Vetter2021-03-263-0/+6
| | | | Related to https://github.com/profanity-im/profanity/issues/1512
* autocomplete: remove duplicate code in search functionsMichael Vetter2021-03-111-54/+16
| | | | | | _search_next and _search_prev where exactly the same except taking the nex/prev from the list. Use one function with a direction argument.
* autocomplete: Use asprintf don't calculate length twiceMichael Vetter2021-03-111-4/+9
| | | | | | | | Through asprintf() we can get rid of malloc() + sprintf(). Also we don't need to calculate the strlen() again since asprintf() returns the bytes printes. Only non UTF-8 characters. But that was true before already.
* Remove duplicate code in autocomplete_param*Michael Vetter2021-03-111-29/+22
| | | | | autocomplete_param_with_func and -autocomplete_param_with_ac had lots of duplicate code.
* Upload: Fix unused returnThorben Günther2021-03-111-4/+9
|
* Update to the newest version of XEP 0363 (HTTP Upload)Maximilian Wuttke2021-03-112-0/+32
| | | | | | | | | | | | | Main changes: 1. Attributes instead of tags 2. Read the optional <header> tags and send them in the HTTP PUT header: * Authorization * Cookie * Expires Co-authored-by: Martin Dosch <martin@mdosch.de>
* Update copyrightMichael Vetter2021-01-082-2/+2
|
* Fix deadlock on error before HTTP download has begunWilliam Wennerström2020-12-101-4/+6
|
* Remove cmd_tiny, empty files and link nonce with IVWilliam Wennerström2020-12-073-2/+2
|
* Add tests for format_call_external_argvWilliam Wennerström2020-12-071-2/+2
|
* Fix bad order of parameters for url saveWilliam Wennerström2020-12-071-1/+7
|
* Rework url to filenameWilliam Wennerström2020-12-062-8/+6
|
* Move unique_filename_from_url functions to commonWilliam Wennerström2020-12-042-21/+0
|
* Refactor for threaded external executable for built-in download methodsWilliam Wennerström2020-12-035-2/+45
|
* Fix stubs and move some tests to http_commonWilliam Wennerström2020-11-162-18/+12
|
* Switch to g_strerrorWilliam Wennerström2020-11-162-23/+19
|
* Move common http tool code to http_commonWilliam Wennerström2020-11-166-53/+154
|
* Add I/O error handling and use filenames instead of file descriptorsWilliam Wennerström2020-11-164-51/+87
|
* Refactor OMEMO download into AESGCMDownload toolWilliam Wennerström2020-11-166-2/+221
|
* Run make format on rebaseWilliam Wennerström2020-11-164-57/+64
|
* Remove unsafe Conent-Disposition inferringWilliam Wennerström2020-11-162-119/+19
|
* Infer filename from content-disposition or URLWilliam Wennerström2020-11-162-7/+123
| | | | | The Content-Disposition inferring is probably a bad idea security wise, so I am going to remove it.
* Add http_download toolWilliam Wennerström2020-11-163-1/+287
|
* Add guards for OMEMOWilliam Wennerström2020-11-161-1/+3
|
* Move setup for AESGCM to omemo/cryptoWilliam Wennerström2020-11-161-0/+2
|
* Reformat HTTP get URL to AESGCM schemeWilliam Wennerström2020-11-162-30/+69
|
* Refactor to use file streamWilliam Wennerström2020-11-162-24/+17
|
* Initial /sendfile OMEMO encryptionWilliam Wennerström2020-11-162-15/+15
|
* Declare counter var inside loopMichael Vetter2020-11-092-19/+10
| | | | We require c99/gnu99 anyways.
* parser.c: Use glibMichael Vetter2020-07-231-4/+4
| | | | | | | | We use malloc() to allcoate memory for the arguments. But later on in cmd_funcs.c we use g_strfreev() to free it. Let's use g_malloc() to allocate instead. Second change is to use g_malloc() and g_free() for a gchar.
* Fix /correct quotation marks usageMichael Vetter2020-07-232-0/+28
| | | | | | | Add new `parse_args_as_one()` function to just use everything after the command as the argument. Fix https://github.com/profanity-im/profanity/issues/1404
* parser.c: Use helper function to reduce duplicate codeMichael Vetter2020-07-211-143/+50
| | | | | | | | | | `parse_args()` and `parse_args_with_freetext()` shared a lot of common code. Let's have a helper function `_parse_args_helper()` for that. The `with_freetext` parameter will make it behave like `parse_args_with_freetext()`. In preparation for https://github.com/profanity-im/profanity/issues/1404
* parse_args(): Call g_free() onceMichael Vetter2020-07-211-3/+2
|
* Use parse_args_with_freetext() for `/correct`Michael Vetter2020-07-201-2/+2
| | | | | | | | | | | | | This commit partly reverts 8f37afcd37ad8663ca36c13ca7fbc4a431119f73 Which was using a wrong approach to achieve this. It changed parse_args() to have a -1 for infinite parameters. But actually parse_args_with_freetext() should have been used exactly for this behaviour. Discovered when checking for https://github.com/profanity-im/profanity/issues/1404
* bookmark_ignore.c: use gchar instead of charMichael Vetter2020-07-201-7/+7
|
* Fix typo in commentMichael Vetter2020-07-151-1/+1
|
* Remove `/tiny` commandMichael Vetter2020-07-102-144/+0
| | | | | | boothj5 gave his okay too. Fix https://github.com/profanity-im/profanity/issues/1370
* Apply coding styleMichael Vetter2020-07-0712-225/+227
|
* Revert "Apply coding style"Michael Vetter2020-07-0712-240/+238
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-0712-238/+240
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* Remove prefs_free_string()Michael Vetter2020-07-021-1/+1
| | | | | It just does a free. Related to b580b9ef119045f142fa4baa9689a1c5ce8864ef