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
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
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
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
e98644f631
Add guards for OMEMO
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
ade0ff589d
parser.c: Use glib
...
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.
2020-07-23 09:42:43 +02:00
Michael Vetter
8c0c5cb28c
Fix /correct quotation marks usage
...
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
2020-07-23 09:40:22 +02:00
Michael Vetter
5a9f76c16a
parser.c: Use helper function to reduce duplicate code
...
`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
2020-07-21 10:45:29 +02:00
Michael Vetter
0077d02c86
parse_args(): Call g_free() once
2020-07-21 10:20:34 +02:00
Michael Vetter
86281072f9
Use parse_args_with_freetext() for /correct
...
This commit partly reverts
8f37afcd37
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
2020-07-20 15:33:19 +02:00
Michael Vetter
b5794a51bb
bookmark_ignore.c: use gchar instead of char
2020-07-20 10:17:35 +02:00
Michael Vetter
1f90a41b89
Fix typo in comment
2020-07-15 11:18:27 +02:00
Michael Vetter
39315483a8
Remove /tiny
command
...
boothj5 gave his okay too.
Fix https://github.com/profanity-im/profanity/issues/1370
2020-07-10 17:48:34 +02:00
Michael Vetter
a2726b6a7d
Apply coding style
2020-07-07 14:18:57 +02:00
Michael Vetter
a4cadf78fa
Revert "Apply coding style"
...
This reverts commit 9b55f2dec0
.
Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0
Apply coding style
...
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
Michael Vetter
e5ac12afa6
Remove prefs_free_string()
...
It just does a free.
Related to b580b9ef11
2020-07-02 11:34:12 +02:00
Dmitry Podgorny
ca3da61776
Add missed string.h
...
strdup(3) requires string.h
2020-06-24 03:07:53 +03:00
Michael Vetter
de91a99178
Fix memleak in autocomplete_remove_older_than_max*
2020-05-29 11:28:58 +02:00
Michael Vetter
bfaf737efa
urlopen: get last URL first
...
Fix https://github.com/profanity-im/profanity/issues/1348
2020-05-29 11:26:18 +02:00
Michael Vetter
438552c14c
Save bookmark ignore list
2020-05-25 13:49:24 +02:00
Michael Vetter
be4a6cac78
Add bookmark ignore add|remove
...
Regards https://github.com/profanity-im/profanity/issues/1115
2020-05-24 17:55:15 +02:00
Michael Vetter
f121554088
List ignored bookmarks
...
`/bookmarl ignore` lists the ignored bookmarks.
Regards https://github.com/profanity-im/profanity/issues/1115
2020-05-24 17:55:08 +02:00
Michael Vetter
242ffbcf70
Add bookmark ignore functionality for multiple accounts
...
```
cat ~/.local/share/profanity/bookmark_ignore
[jubalh@iodoru.org ]
profanity@rooms.dismail.de=true
[testuser@domain.org ]
testr@rooms.domain.org=true
```
Regards https://github.com/profanity-im/profanity/issues/1115
2020-05-24 13:31:24 +02:00
Michael Vetter
d03c953d4a
PoC for bookmark ignore
...
```
~/.local/share/profanity % cat bookmark_ignore
[ignore]
profanity@rooms.dismail.de=
```
Regards https://github.com/profanity-im/profanity/issues/1115
2020-05-24 12:55:43 +02:00
Michael Vetter
aef74f90ec
Only save max 20 urls
2020-05-20 10:54:58 +02:00
Michael Vetter
9be7d29f1b
Don't expose upload_processes
...
That's actually not good practise.
Realized this when checking for multiple symbol definition in issue
mentioned below.
Regards https://github.com/profanity-im/profanity/issues/1314
2020-04-17 10:05:09 +02:00
Michael Vetter
8f37afcd37
xep-0308: Make /correct work without quotation marks
...
Now we can specify an unlimited amount of arguments for commands.
Maybe this is also helpful for other commands that use quotation marks
so far.
2020-02-14 10:17:07 +01:00
Paul Fariello
a52e3ea1d8
Add context to autocomplete_with_func and use it for omemo trust command
...
Fix #1068
2020-01-31 10:07:08 +01:00
Michael Vetter
be13e98fe7
Update my Copyright to 2020
2020-01-03 19:52:31 +01:00
Michael Vetter
46fd7150e5
Add vim modeline
2019-11-13 12:11:05 +01:00
Michael Vetter
5d6cb3c741
Dont use clipboard_init yet
...
For now we initialize gtk in tray_init().
Should maybe use a general function and check in tray_init and
clipboard_init whether gtk was already initialized.
2019-10-29 15:20:57 +01:00
Michael Vetter
b46dbcc363
Add clipboard feature
...
Use GTK to take the text from the clipboard.
Add `/paste` command which pastes this text now to console window.
2019-10-29 15:20:57 +01:00
Michael Vetter
9b3517c21e
Free strings in autocomplete_param_no_with_func
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 19:05:27 +02:00
Michael Vetter
b591f0cf2b
Free list in error case in parse_options
...
Fix memleaks.
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 18:12:50 +02:00
Michael Vetter
897dfbb3c1
Fix memleak in get_start()
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 17:42:44 +02:00
William Wennerström
0c10a699f2
Always check for directory changes with sendfile auto completion
...
Instead of only checking for files when 'last_directory' has changed, do
it every time.
Add autocomplete_update function that updates the items while retaining
last_found and search_str.
Fixes #1099
2019-07-20 10:38:22 +02:00
Michael Vetter
706af9a900
Update copyright to include 2019
2019-01-22 11:31:45 +01:00
Michael Vetter
9e021d5c8f
Remove p_sha1 source files
...
And delete from Makefile.am
2018-09-05 11:45:31 +02:00
James Booth
250e972b7a
Update copyright
2018-01-21 15:00:02 +00:00
James Booth
6b830277a6
Allow previous autocompletion with shift tab
2017-04-01 00:27:11 +01:00
James Booth
131c98b305
Add missing header
2017-03-25 01:48:40 +00:00
James Booth
b5e0106526
Autocomplete accent and case insensitive
2017-03-25 01:40:20 +00:00
James Booth
286fecf38d
Allow installing plugins from directory
2017-02-05 21:09:03 +00:00
James Booth
68a3daedb9
Update Copyright
2017-01-28 17:24:22 +00:00
James Booth
b64646979e
Remove unused function
2016-11-24 00:09:14 +00:00
James Booth
af42bc4434
Add win_print_http_upload
2016-10-11 23:40:15 +01:00
James Booth
772a72b6e6
Add config.h to http_upload.c
2016-10-02 22:52:17 +01:00
Dominik Heidler
5d354defca
Fix indentation in http_upload.c
2016-07-25 12:28:33 +02:00
James Booth
0a57c4de78
Tidy headers
2016-07-24 15:43:51 +01:00
James Booth
9cff37352a
Make header defines consistent
2016-07-24 14:51:39 +01:00
James Booth
e8fc80f5c1
Update GPL link in headers
2016-07-24 01:14:49 +01:00
James Booth
71178b3696
Store plugin completers by plugin name
2016-07-05 21:46:36 +01:00
James Booth
f377e0329e
Allow autocomplete for basic compelters when no input
2016-05-24 00:32:53 +01:00
James Booth
043a673fe1
Merge remote-tracking branch 'asdil12/xep_0363_http_file_upload'
2016-04-26 23:30:26 +01:00
James Booth
4ca6296fb7
Fix OSX compile
2016-04-26 23:50:56 +02:00
James Booth
65960dfbb2
Fixed cygwin compile (again)
2016-04-26 23:50:56 +02:00
James Booth
9d263d7c83
Fixed cygwin compile
2016-04-26 23:50:55 +02:00
Dominik Heidler
1b0ce852bb
Implement XEP-0363: HTTP File Upload
2016-04-26 23:50:55 +02:00
James Booth
e53e94f1e2
Updated copyright
2016-02-14 22:54:46 +00:00
James Booth
10507b687b
Added sys/select.h header includes
2016-01-19 22:55:43 +00:00
James Booth
0017098400
Applied coding style to src/tools/
2015-10-25 22:47:42 +00:00
James Booth
09e1e7618e
Use null check convention in tinyurl.c
2015-05-04 22:57:49 +01:00
James Booth
fe216b4e97
Use null check convention in parser.c
2015-05-04 22:57:19 +01:00
James Booth
7454bede8b
Merge branch 'master' into readline
2015-02-23 00:50:58 +00:00
Christian Storm
a1d14c4526
Fixed spelling.
2015-02-17 10:52:37 +01:00
James Booth
b24510c776
Merge branch 'master' into readline
...
Conflicts:
src/tools/history.c
src/tools/history.h
2015-02-11 00:09:58 +00:00
James Booth
b3be26a214
Updated copyright
2015-02-10 23:16:09 +00:00
James Booth
a9ed64911d
Removed history and various key handlers
2015-01-30 23:42:51 +00:00
James Booth
4c6cfcdca0
Simplified autocompleters and command history
2015-01-16 22:50:40 +00:00
James Booth
6c980969e0
Added compile time checks for big endian from @pasis
2014-10-26 21:43:50 +00:00
James Booth
a78891b8b3
Added patch from @pasis for big endian architectures
2014-10-21 23:56:24 +01:00
James Booth
a4f7932ed7
Check for NULL inside autocomplete_free
2014-09-26 00:48:48 +01:00
James Booth
0b2a1a1bc7
Renamed autocomplete function to get list
2014-09-26 00:06:50 +01:00
James Booth
a905ce18a3
Added autocompletion for jid-multi form fields
2014-09-17 23:36:10 +01:00
James Booth
45ba6f1fed
Added autocompletion for form text-multi values
2014-09-17 23:35:51 +01:00
James Booth
b934ad54d5
Added form tests
2014-09-14 22:31:27 +01:00
James Booth
f9737251a6
Added license exemption for OpenSSL to source headers
2014-08-24 20:57:39 +01:00
James Booth
cc62fe376c
Finished chat room nick autocomplete
2014-07-15 21:30:23 +01:00
James Booth
2f3234a5f5
Added quote param to autocomplete_param_with_ac
2014-07-09 20:32:28 +01:00
James Booth
954661e59e
Added quote param to autocomplete_complete
2014-07-09 20:23:47 +01:00
James Booth
0c9851106b
Added quote param to autocomplete searches
2014-07-09 20:15:20 +01:00
James Booth
ecedca8a95
Free tokens when 0 supplied an 0 min, parse_args_with_freetext
2014-06-17 22:30:51 +01:00
James Booth
92837ec186
Renamed sha1 functions to avoid naming clashes
2014-06-15 19:08:18 +01:00
James Booth
b9b5d6a5f8
Fixed memleak in autocompleter
2014-06-15 17:32:30 +01:00
James Booth
575b6acdd2
Use public domain SHA1 code, remove libgcrypt dependency
2014-06-01 22:42:10 +01:00
James Booth
ff37b44a62
Added common.h to parser.c
2014-05-22 20:07:43 +01:00
James Booth
a519d25e4b
Fixed potential segfaults on autocomplete
2014-05-08 20:49:41 +01:00
James Booth
d6e92f62dc
Fixed cppcheck warnings
2014-04-26 00:36:36 +01:00