about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* cmd_url_*(): use gchar instead of charMichael Vetter2020-07-024-6/+6
|
* Use correct format when transforming old urlopen.cmdMichael Vetter2020-07-021-2/+9
| | | | | | | | | | | | | | | | | | | | | Additionally to ec7e635e752bdfef851fd177596c1d73d97afb42. In the earlier commit I just setted the test value ignoring the real format. Now we correctly transform: ``` [logging] urlopen.cmd=xdg-open ``` into: ``` [executables] url.open.cmd=false;xdg-open %u; ```
* cmd_url_open(): fix memleakMichael Vetter2020-07-021-0/+1
|
* use '*' to set a default executablePierre Mazière2020-07-022-15/+28
| | | | Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* fix examples for /executablePierre Mazière2020-07-021-2/+2
| | | | Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* cmd_url_*(): remove NULLing when not neededMichael Vetter2020-07-011-8/+4
|
* cmd_executable(): Check arg lengthsMichael Vetter2020-07-011-0/+10
|
* Adjust `/executable` test to be more preciseMichael Vetter2020-07-011-1/+1
|
* Move url/avatar commands from logging to exectuables sectionMichael Vetter2020-07-011-0/+14
| | | | | | | | | c56d530b67d09267eb46cba029217e4b84b32cef by peetah moves: urlopen.cmd from the 'logging' to a new 'executables' section in profrc avatar.cmd from the 'logging' to a new 'executables' section in profrc We need to adapt this so that users don't have to set the setting again themselves.
* console.c: Use prefs_free_string()Michael Vetter2020-07-011-1/+1
| | | | | f9961677aaa8d2713a80127f95a3770b33af4cef replaces prefs_free_string() with g_free(). Both is correct but lets still use this.
* prefs_free_string() doesnt need to check if pref is NULLMichael Vetter2020-07-011-4/+1
| | | | g_free(NULL); is noop.
* Display a message acknowledging file saving successPierre Mazière2020-06-251-0/+2
| | | | Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Display default value for /url associated commandsPierre Mazière2020-06-251-5/+9
| | | | | | | | | | The display of commands associated with specific file types and protocols will need to be implemented later, but this requires to use private data of the GKeyFile structure, which can be a maintainability issue on the long term. Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Add /url autocompletionPierre Mazière2020-06-251-4/+22
| | | | Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Replace /urlopen with /url and adapt /executablePierre Mazière2020-06-255-33/+249
| | | | | | | | /urlopen is replaced by /url with the following sub commands: /url open <url> /url save <url> [<path>] Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Add string and string list preferences with optionPierre Mazière2020-06-252-1/+89
| | | | | | | | | | | | Where GKeyFile usually use the pref[locale] format to define locale specific translated data, it is here hijacked to be used as pref[option] in order to specialize a preference according to an option: open.url.cmd[pdf] = pdf-viewer open.url.cmd[jpg] = image-viewer Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Refactor cmd_urlopenPierre Mazière2020-06-251-16/+16
| | | | Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Add aesgcm to urls grabberPierre Mazière2020-06-251-1/+1
| | | | Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Fix gcc warnings for cygwinDmitry Podgorny2020-06-241-3/+4
| | | | | | | | | | | | | strncpy(3) is not so safe function and can lead to mistakes. For example, strncpy(dest, "Profanity", 10); is redundant and leads to problems when someone changes the source string. Different example is when 3rd argument equals to length of the destination buffer. strncpy(3) doesn't terminate string with '\0' when it truncates. Therefore, the destination string becomes corrupted. Zeroize storage for 'nid', so the last byte remains '\0' in case of truncate.
* Add missed string.hDmitry Podgorny2020-06-241-0/+1
| | | | strdup(3) requires string.h
* Fix NULL terminated listMichael Vetter2020-06-231-1/+1
| | | | Regards https://github.com/profanity-im/profanity/issues/1367
* Use shell to start eval_password commandMichael Vetter2020-06-191-5/+1
| | | | | | | | | | | | | | Since https://github.com/profanity-im/profanity/commit/d92c576aa53505d712715b1acc6344af3262c84f we rely on g_spawn_sync(). Which doesn't do variable/glob expansion. For our use of call_external() in opening and URL or avatar this is fine. For getting the password we want to be able to use ~ for our files. Let's use a shell here. Fix https://github.com/profanity-im/profanity/issues/1364
* Fix possible segfault in xmpp/message.cDmitry Podgorny2020-06-161-1/+1
| | | | Check for pointer to be NULL before dereferencing it.
* Fix reading/writing linked filesMichael Vetter2020-06-135-4/+5
| | | | | | "base" was not really base but the filename :-) Fix https://github.com/profanity-im/profanity/issues/1362
* Define POSIX macro to have strdupMichael Vetter2020-06-127-24/+27
| | | | | | | | | | | | | | https://github.com/profanity-im/profanity/commit/98c38dc6d6d29333c63f80327774f094610d8602 sets C99 as standard. strdup() is not part of C99. For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99. Using `gnu99` instead would be another option. We should take more care to use glib functions whenever possible. Regards https://github.com/profanity-im/profanity/issues/1357
* Dont manipulate pointer from getenvMichael Vetter2020-06-121-6/+14
| | | | | | | | | | | | Found this when looking to fix bug https://github.com/profanity-im/profanity/issues/1357 Not sure if it is related. man 3 getenv sais: ``` As typically implemented, getenv() returns a pointer to a string within the environment list. The caller must take care not to modify this string, since that would change the environment of the process. ```
* Make legacy auth optionalDmitry Podgorny2020-06-111-0/+9
| | | | | | | | Some systems don't provide recent libstrophe releases. When older version of libstrophe is detected, don't build legacy auth support. To simplify this patch, report about unsupported legacy auth and keep commands option as is.
* Add option for legacy authenticationDmitry Podgorny2020-06-0514-27/+213
| | | | | | | | New options: /connect <account> [auth default|legacy] /account <account> set auth default|legacy Fixes #1236.
* Fix memleak againMichael Vetter2020-06-031-1/+5
| | | | | | | | | | Memleak was reinroduced in d92c576aa53505d712715b1acc6344af3262c84f It was already fixed in ac5ce105ac08f022d88d7e73dc38f2706d4c44cf But the rebase peetahs rebase ontop of master took the wrong changes. I decided to pull anyways and fix since reviewing/giving feedback without GH probably takes longer.
* Use external_call to get password via eval_password commandPierre Mazière2020-06-031-26/+24
| | | | Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Get output and error streams from the command spawned by external_call()Pierre Mazière2020-06-034-14/+93
| | | | Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
* Fix offline roster contactsMichael Vetter2020-06-021-1/+2
| | | | | | | | | | | | | | | | | Fix https://github.com/profanity-im/profanity/issues/1280 p_contact_set_presence() is triggered in (roster_process_pending_presence) to set the presence to online after the roster is displayed. This happened to me _every time_ with one certain account on my server. But not even once with other accounts on my server. I don't understand why that is the case, but AFAIK the code should be like it is in this PR anyways. roster_process_pending_presence() was added there in 973a05d15a9843f2e8f6dff598f2161367885994 to fix https://github.com/profanity-im/profanity/issues/1050
* Fix memleak in cmd_urlopen()Michael Vetter2020-05-291-1/+3
|
* Fix memleak in autocomplete_remove_older_than_max*Michael Vetter2020-05-291-0/+1
|
* urlopen: get last URL firstMichael Vetter2020-05-293-10/+26
| | | | Fix https://github.com/profanity-im/profanity/issues/1348
* Merge branch 'bugfix/1329'Michael Vetter2020-05-291-14/+19
|\
| * _omemo_receive_devicelist() use if/elseMichael Vetter2020-05-291-18/+19
| |
| * OMEMO - Request only "current" itemDebXWoody2020-05-231-1/+5
| | | | | | | | | | | | | | | | | | NOTE: as per XEP-0060 §12.20, it is RECOMMENDED for the publisher to specify an ItemID of "current" to ensure that the publication of a new item will overwrite the existing item. https://xmpp.org/extensions/xep-0384.html#devices Issue: 1329
* | Merge pull request #1343 from DebXWoody/bugfix/1333Michael Vetter2020-05-291-0/+2
|\ \ | | | | | | Incoming iq stanza - Reset the autoping timer
| * | Incoming iq stanza - Reset the autoping timerDebXWoody2020-05-231-0/+2
| |/ | | | | | | | | | | | | | | A autoping is to make sure that there is still a connection between server and client. If the application receives incoming stanza, the connection is fine. There is no need to wait for response, if there are other incomings. Issue: #1333 and #1315
* | Merge pull request #1344 from DebXWoody/bugfix/1327Michael Vetter2020-05-281-2/+1
|\ \ | | | | | | Bugfix: Status with PGP shows offline in titlebar
| * | Bugfix: Status with PGP shows offline in titlebarDebXWoody2020-05-231-2/+1
| |/ | | | | | | | | | | | | | | There is code to redraw the ui, because the user may enter a passphase for the private key. There was also a ui_init, which shouldn't be called, because it will set the status to the initial state, which is 'offline' and 'no tls'. Issue: #1327
* | Fix carbon loggingMichael Vetter2020-05-273-14/+18
| | | | | | | | Regards https://github.com/profanity-im/profanity/issues/1342
* | Fix titlebar write positionMichael Vetter2020-05-271-4/+35
| | | | | | | | | | | | | | | | Mistake introduced in 86f0e0ea7033a27a83a5c24091ae1fd5b579296d The functions later on dont set an explitic position when writing their strings. Fix https://github.com/profanity-im/profanity/issues/1346
* | Save bookmark ignore listMichael Vetter2020-05-252-1/+19
| |
* | Handle listing ignored bookmarks when none are ignoredMichael Vetter2020-05-251-0/+6
| |
* | Add and use connection_get_barejid()Michael Vetter2020-05-2511-91/+96
| | | | | | | | Instead of connection_get_fulljid() and then creating a Jid from it.
* | Add `/bookmark ignore` autocompletionMichael Vetter2020-05-241-0/+21
| | | | | | | | Regards https://github.com/profanity-im/profanity/issues/1115
* | Add bookmark ignore add|removeMichael Vetter2020-05-244-3/+34
| | | | | | | | Regards https://github.com/profanity-im/profanity/issues/1115
* | List ignored bookmarksMichael Vetter2020-05-247-2/+54
| | | | | | | | | | | | `/bookmarl ignore` lists the ignored bookmarks. Regards https://github.com/profanity-im/profanity/issues/1115