about summary refs log tree commit diff stats
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* Fix duplicate download IDs.IsaacM882023-03-096-19/+24
| | | | | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1794 Explanation The problem is the download's identifier. Downloads are given an ID so they can be referenced later when their progress changes. Currently, the download's ID is the download's URL. When you download the same file twice, you have two downloads with the same ID. Download progress updates are shown on the first of both downloads with the same ID. Solution Change the download's ID from its URL to a random number. A random ID is generated when get_random_string() is called from cmd_funcs.c. Several other functions are updated to cope with the new ID format.
* Fix quote and url autocompletion for MAM and historyMarcoPolo-PasTonMolo2023-02-132-3/+8
| | | | | | | | After adding MAM quote and url autocompletion wouldn't pick up messages from MAM or history(from DB) or would have them in the wrong order. This commit fixes that. Fixes https://github.com/profanity-im/profanity/issues/1770
* fix more memory leaksSteffen Jaeckel2023-01-181-1/+1
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* minor changesSteffen Jaeckel2023-01-181-40/+9
| | | | | | | | | | | * fix typo * less code duplication * less `GString` usage * more `auto_gchar` usage * document connecting to servers supporting SASL ANONYMOUS * ignore valgrind output Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Update copyright yearMichael Vetter2023-01-106-6/+6
|
* Spawn external programs asynchronouslyMarouane L2022-10-122-2/+2
| | | | | | | | Drawback is that we can't check the exitcode anymore. But we were unsure why/when we need this, see: https://github.com/profanity-im/profanity/pull/1760/files#r980868708 Fixes https://github.com/profanity-im/profanity/issues/1759
* Tell user where the downloaded file is storedSteffen Jaeckel2022-09-071-2/+2
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Include common.h and xmpp.h in editor.cMichael Vetter2022-06-281-0/+2
| | | | That was pulled in through log.h
* Include xmpp.h in bookmark_ignore.cMichael Vetter2022-06-281-0/+2
| | | | That was pulled in through log.h
* Improve cmd argument parserMarcoPolo-PasTonMolo2022-06-161-3/+12
| | | | | | | | | "" used to become " now it just becomes an empty argument. Also if quotes appeared after a token started then if the number of quotes in the token is n the resulting one would be a token with the n last characters cut off, now it's fixed. Fixes https://github.com/profanity-im/profanity/issues/497
* Update copyright yearMichael Vetter2022-05-094-4/+4
|
* Fix a segfault when uploading or downloading filesMaxi Wuttke2022-04-022-2/+2
| | | | The variable `ccount->tls_policy` was not null-tested before `strcmp`.
* Fix crash on /editorMarcoPolo-PasTonMolo2022-03-241-1/+5
|
* apply `tls.policy` to cURL callsSteffen Jaeckel2022-03-222-0/+14
| | | | | | | | | | | | In case the user decides to ignore the validity-state of certificates we also have to configure libcurl accordingly. `tls.policy` can be set via ``` /account set <account> tls trust ``` Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add profanity-specific CAfileSteffen Jaeckel2022-03-222-0/+12
| | | | | | | | The profanity-internal mechanism to allow connecting to a server isn't easily portable to cURL. Therefor introduce a profanity-specific CAfile which is managed individually and will be configured in libcurl calls. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* re-factor `get_message_from_editor()`Steffen Jaeckel2022-03-141-62/+50
| | | | | | | * use GLib functions to write&read compose file * trim trailing new-line characters from compose file Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* 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
|
'Blame the previous revision' href='/akkartik/mu/blame/html/020run.cc.html?h=main&id=e35c2d6857e1ed916221faae707e3c53ff8ed042'>^
204dae92 ^




201458e3 ^
204dae92 ^


201458e3 ^
204dae92 ^

201458e3 ^

204dae92 ^









201458e3 ^
204dae92 ^














201458e3 ^
204dae92 ^

201458e3 ^
204dae92 ^






































201458e3 ^

204dae92 ^








201458e3 ^
204dae92 ^





201458e3 ^
204dae92 ^


201458e3 ^
204dae92 ^


201458e3 ^
204dae92 ^
201458e3 ^

204dae92 ^

















201458e3 ^
204dae92 ^












201458e3 ^
204dae92 ^











201458e3 ^
204dae92 ^

201458e3 ^
204dae92 ^




201458e3 ^
204dae92 ^
201458e3 ^
204dae92 ^








201458e3 ^
204dae92 ^








201458e3 ^
204dae92 ^





201458e3 ^
204dae92 ^







201458e3 ^
204dae92 ^




201458e3 ^
204dae92 ^




201458e3 ^
204dae92 ^




201458e3 ^
204dae92 ^


672e3e50 ^


a654e4ec ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512