1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-29 19:56:07 -04:00
Commit Graph

3781 Commits

Author SHA1 Message Date
Paul Fariello
605e06411c Get rid of libsodium 2019-04-10 16:31:45 +02:00
Paul Fariello
695694051e Remove hints preventing carbons to work properly 2019-04-10 16:31:45 +02:00
Paul Fariello
1309405d28 Add log on OMEMO session start 2019-04-10 16:31:45 +02:00
Paul Fariello
3d8c928e53 Use profanity logs for OMEMO logs 2019-04-10 16:31:45 +02:00
Paul Fariello
bcd582be42 Don't explicitely disable carbons for OMEMO messages 2019-04-10 16:31:45 +02:00
Paul Fariello
9b8c1d7d2c Add support for encrypted carbon
Fix {signed,}_pre_key store
2019-04-10 16:31:45 +02:00
Paul Fariello
20ed86c58c Handle requested device list for session start 2019-04-10 16:31:45 +02:00
Paul Fariello
421d1b1560 Add OMEMO identity materials long term storage 2019-04-10 16:31:39 +02:00
Paul Fariello
810ea32223 Follow normal workflow for OMEMO message reception
We try to decrypt all messages, if it's successful we use
sv_ev_incoming_message even for OMEMO messages. We pass an OMEMO
boolean to let UI be aware that message were encrypted.
2019-04-10 16:03:50 +02:00
Paul Fariello
d871efdcf9 Add chat session state to OMEMO message stanza 2019-04-10 16:03:50 +02:00
Paul Fariello
904904d74e Add default body on OMEMO message 2019-04-10 16:03:50 +02:00
Paul Fariello
0fb27dc496 Add OMEMO message encryption and decryption 2019-04-10 16:03:50 +02:00
Paul Fariello
b1ae220aa4 Create signal session 2019-04-10 16:03:50 +02:00
Paul Fariello
f9216fddb1 Add signal store backend and OMEMO start command 2019-04-10 16:03:50 +02:00
Paul Fariello
1f9d46037c Request for device list when OMEMO is ready 2019-04-10 16:03:50 +02:00
Paul Fariello
95da03ac28 Ensure received devicelist contains our own device id 2019-04-10 16:03:50 +02:00
Paul Fariello
756fefb09a Fix devicelist subscription and handle pubsub event
Devicelist subscription can be done directly with caps_add feature.
2019-04-10 16:03:50 +02:00
Paul Fariello
79bb5016c2 Ensure not to generate omemo crypto twice 2019-04-10 16:03:50 +02:00
Paul Fariello
d8d7a5348c Ensure OMEMO isn't started before starting OTR 2019-04-10 16:03:50 +02:00
Paul Fariello
1ae5d9f1f8 Add pubsub event callback
Also add generic message callback struct
2019-04-10 16:03:50 +02:00
Paul Fariello
2d28725c85 Rename ProfIdCallback into ProfIqCallback
Goal is to create other kind of callback no based on id cmp
2019-04-10 16:03:50 +02:00
Paul Fariello
fdc5f25f2d Add devicelist and bundle publication 2019-04-10 16:03:50 +02:00
Paul Fariello
bce1981128 Add devicelist subscription 2019-04-10 15:37:22 +02:00
Paul Fariello
2602cbf785 Move OMEMO initialization to profanity intialization
Also store identity keys into account
2019-04-10 15:37:22 +02:00
Paul Fariello
519cf295f3 Add signal-protocol locking 2019-04-08 11:50:12 +02:00
Paul Fariello
bfbc8edcad Add crypto backend for signal-protocol 2019-04-08 11:50:12 +02:00
Paul Fariello
4a5b672f95 Link against libsignal-protocol-c 2019-04-08 11:50:12 +02:00
Paul Fariello
aa9dcf7b3a Avoid use after free on default account
Fix 1046
2019-04-08 11:20:14 +02:00
David Baer
a1ec80e194 Fix use after free bug 2019-03-22 09:10:54 -04:00
Michael Vetter
d0a1cae8e8 Fix /me display when highlighting user in MUCs
Fixes https://github.com/boothj5/profanity/issues/950
Closes https://github.com/boothj5/profanity/pull/992
2019-02-26 12:02:32 +01:00
Philip Flohr
5b7f9dffbc Fix broken support for case-sensitive account names
Don't lower account name before calling accounts_get_account().
Only lower if there is no account with the given name and the name is
interpreted as a jid.
Updated unittests to test this behaviour.

Fixes #725

.
2019-02-22 13:08:08 +01:00
Michael Vetter
6034b833be Redraw screen after entry of PGP secret key
After specifying the PGP key ID with pgp.keyid within the accounts file on startup profanity asks for the secret key passphrase. It then doesn't redraw the screen, leaving it in an odd looking state.

This probably only happens with pinentry-curses since it draws in
screen.

We need this fix for cli only environments.

Fixes https://github.com/boothj5/profanity/issues/906 reported by Bob
Mottram.
Based on https://github.com/boothj5/profanity/pull/908 by Bob Mottram

Bob removed his GitHub account, so GitHub created a ghost placeholder
user for him, which unfortunately makes it impossible to cherry-pick
this commit. To more or less preserve authorship I added him as
co-author.

Commit picked and message edited by jubalh.

Co-authored-by: Bob Mottram <bob@freedombone.net>
2019-02-20 12:03:23 +01:00
Viachaslau Khalikin
289b05ea50 Restoration of correct GPG encryption
Fixes https://github.com/boothj5/profanity/issues/997
Proposed as https://github.com/boothj5/profanity/pull/1008
Related to XEP-0027.

Message edited and commit cherry picked by jubalh.
2019-02-20 11:53:40 +01:00
Michael Vetter
4792984f1e XEP-0027: Mention XEP in message body
With all the different kinds of encryption (OMEMO, OTR3 OTR4, PGP in XEP-0027 and XEP-0373) it might be helpful to know which kind of encryption is used.
2019-02-20 10:48:28 +01:00
Michael Vetter
c8f55ed338
Merge pull request #994 from philipflohr/master
Fail plugin unloading if plugin does not exist
2019-02-20 10:31:34 +01:00
Michael Vetter
fbbf920e2a
Merge pull request #995 from philipflohr/plugins_unload_all
let plugins_unload_all fail if one plugin unload operation fails
2019-02-20 10:22:49 +01:00
Philip Flohr
d1c54e9aaa Fail plugin unload operation if plugin does not exist 2019-02-20 10:21:17 +01:00
Michael Vetter
0c07b7cf50 Fix autoaway typo 2019-02-19 23:01:53 +01:00
Michael Vetter
706af9a900 Update copyright to include 2019 2019-01-22 11:31:45 +01:00
Paul Fariello
ac2d1c07fa Fix optionnal sessionid in xep 0050 2019-01-21 15:02:54 +01:00
twardziejszy
ca29638f2c Add prof_win_close (#1017) 2019-01-10 12:44:52 +01:00
Michael Vetter
a97202ace6 Merge branch 'nick'
See https://github.com/boothj5/profanity/pull/1023
2018-11-22 11:00:18 +01:00
Raf Czlonka
b4739b328e Nicks containig spaces need to be quoted
For example "FirstName LastName", need to be quoted.
2018-11-22 10:59:18 +01:00
Raf Czlonka
fb2ca00f93 Splash logo improvements (#1022)
* Splash logo improvements
* Use straight/flat, instead or rounded, outer edges on `o` and `a`
2018-11-21 10:03:37 +01:00
Dmitry Podgorny
3fd6f70bd9 Override account options with connect options
With this feature user can configure TLS policy for an account and
override it for a single login with /connect command.

Example:
 /account set <jid> tls force
 /connect <jid> tls trust
The example shows how to trust server's certificate only once.

Fixes #1021.
2018-11-07 15:02:30 +02:00
Dmitry Podgorny
7f65aaa9a2 Add option to trust server's certificate
New tls policy "trust" added to /connect and /account. With the policy
TLS connection is established even with invalid certificate. Note, that
trust policy forces TLS connection and it fails when server doesn't
support TLS.

Examples:
 /connect <jid> tls trust
 /account <name> set tls trust
2018-11-06 14:09:02 +02:00
Michael Vetter
47f90d7a39
Merge pull request #991 from paulfariello/feature/xep-0050
Add support for xep 0050 ad-hoc commands, without multi-step
2018-09-27 17:27:37 +02:00
Paul Fariello
2e0bc27bf0 Make _get_groups_from_item and roster _compare_* public
In order to avoid duplication with xep 0133 support in command execution
2018-09-26 14:34:52 +02:00
Michael Vetter
bb87122af9
Merge pull request #1011 from jubalh/sha1
Get rid of p_sha1 dependency
2018-09-19 11:45:19 +02:00
Paul Fariello
01428eb858 Add special handling for xep-0133 get-user-roster 2018-09-10 13:09:23 +02:00
Paul Fariello
371b64a842 Don't show submit help on form if there is no submit callback
Could be missleading for user.
2018-09-10 12:50:01 +02:00
Paul Fariello
6de60e7efc Add support for ad-hoc response with forms 2018-09-10 12:28:28 +02:00
Paul Fariello
b7556b4e41 Add missing command name for completion log 2018-09-10 11:30:46 +02:00
Michael Vetter
82f8083b85 Move p_sha1_hash() to stanza.c
Move `p_sha1_hash()` from `common.c` to	`xmpp/stanza.c` as it is only
used in this file and now depends on libstrophe so xmpp is a better
namespace folder.
Renaming it as `_stanza_create_sha1_hash()`. And making static since
only used here.

The function cannot be tested in the unit tests anymore.
Once functional tests are working again we should write a test for the
sha1 functionality.
2018-09-06 20:40:09 +02:00
Philip Flohr
054267d738 Fix extended plugin handling PR
Fixes problems found in PR #999
2018-09-06 19:54:29 +03:00
Philip Flohr
a5a7db9e2b implemented plugin updates 2018-09-06 19:28:02 +03:00
Philip Flohr
cd86f5bc28 added the possibility to uninstall a plugin 2018-09-06 19:28:02 +03:00
Philip Flohr
e4ddced420 use gio functions for file copy 2018-09-06 19:28:02 +03:00
Philip Flohr
2795dc487c removed unreachable code: if plugin is loaded it is also installed and therefore installation will fail. -> The unload code is not needed 2018-09-06 19:28:02 +03:00
Philip Flohr
1f66c08567 provide feedback on failure cause if plugin installation fails 2018-09-06 19:28:02 +03:00
Philip Flohr
adb4955c34 Fail plugin installation if the target file already exists 2018-09-06 19:28:02 +03:00
Paul Fariello
3c70972610 Add default jid for cmd commands on WIN_CONSOLE 2018-09-05 14:37:26 +02:00
Paul Fariello
db1ffae3bd Fix command exec error output 2018-09-05 14:17:26 +02:00
Paul Fariello
771d90c766 Fix comment about config windows 2018-09-05 13:52:20 +02:00
Paul Fariello
4d703c7eb0 Fix description for config commands 2018-09-05 13:52:20 +02:00
Paul Fariello
1d3baa99a7 Ensure cmd commands are run on the right type of window 2018-09-05 13:52:20 +02:00
Paul Fariello
afd4fc4ea1 Fix bad english sentence 2018-09-05 13:52:20 +02:00
Paul Fariello
ec5fc3612f Allow to use cmd without being in a window 2018-09-05 13:52:20 +02:00
Paul Fariello
e555e41eaf Fix cmd command synopsis 2018-09-05 13:52:20 +02:00
Paul Fariello
71c9cbf8a8 Conform to Section 3.2.2.1 of XML Schema Part 2: Datatypes
In accordance with Section 3.2.2.1 of XML Schema Part 2: Datatypes, the
allowable lexical representations for the xs:boolean datatype are the
strings "0" and "false" for the concept 'false' and the strings "1" and
"true" for the concept 'true'; implementations MUST support both styles
of lexical representation.
2018-09-05 13:52:20 +02:00
Paul Fariello
233e076be9 Add support for command config execution 2018-09-05 13:52:19 +02:00
Paul Fariello
b11d3a79df Add conf win callback 2018-09-05 13:51:00 +02:00
Paul Fariello
a952776b89 Rename mucconf wins into conf wins
Configuration windows are now being used by both muc and cmd.
2018-09-05 13:51:00 +02:00
Paul Fariello
7123e94e82 Add support for form edition in command execution
Also change wins_get_by_string prototype in order to handle const str.
2018-09-05 13:51:00 +02:00
Paul Fariello
40eee1caab Add command exec error handling 2018-09-05 13:51:00 +02:00
Paul Fariello
925cd488c1 Handle simple execution
Tested with ping from biboumi
2018-09-05 13:50:59 +02:00
Paul Fariello
c9f6a78f57 Add command subcommands: list and exec
Also handle list result
2018-09-05 13:49:40 +02:00
Paul Fariello
ca022ec75e Add command command
Initial commit to test commands API
2018-09-05 13:42:28 +02:00
Michael Vetter
33e9af4100 Fix command 'group' description 2018-09-05 13:38:17 +02:00
Michael Vetter
9e021d5c8f Remove p_sha1 source files
And delete from Makefile.am
2018-09-05 11:45:31 +02:00
Michael Vetter
dcc249a616 Use libstrophe sha1 functions
Using libstrophes sha1 functions in p_sha1_hash() to get rid of the
p_sha1.c dependency.

Relates to https://github.com/boothj5/profanity/issues/882
2018-09-05 11:31:33 +02:00
Michael Vetter
6d80700329 Move ID generation to xmpp folder
create_unique_id() was changed to use UUIDs instead of a counter in the
last commit. Since now it depends on connection_create_uuid() which is
in the xmpp subfolder the function should also be moved there.

Renamed it to connection_create_stanza_id() and moved it to
src/xmpp/connection.c.

Discussion happened in https://github.com/boothj5/profanity/pull/1010
2018-08-30 11:17:04 +02:00
Michael Vetter
f4fb61b0c8 Use uuid in create_unique_id instead of counter
Message IDs should be unique so they can be used by XEPs like delivery receipts, chat markers, message correction.

So far it used a counter so restarting profanity will cause the counter
to be 0 again.

Let's rather use an UUID since we have such a function in the
xmpp/xmpp.h already.

Closes https://github.com/boothj5/profanity/issues/998
2018-08-14 15:51:18 +02:00
Michael Vetter
811b3ba857
Merge pull request #926 from msantos/null-pointer-dereference
server_events: fix potential NULL pointer deref
2018-07-30 12:23:53 +02:00
Dominik Heidler
86a9ef7b5c Use correct macro
XMPP_FEATURE_PING insted of STANZA_NS_PING
2018-07-30 11:04:54 +02:00
Michael Vetter
64d5f938fd Fix gcc8 error about strncpy
With gcc8 we get the following error when stringop-truncation is on:

```
In function ‘_rotate_log_file’,
    inlined from ‘log_msg.part.2’ at src/log.c:201:17:
src/log.c:231:5: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
     strncpy(log_file_new, log_file, len);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/log.c: In function ‘log_msg.part.2’:
src/log.c:228:18: note: length computed here
     size_t len = strlen(log_file);
                  ^~~~~~~~~~~~~~~~
```

Using memcpy instead of strncpy.
2018-07-06 11:31:20 +02:00
Philip Flohr
7861c8c03c plugins_unload_all fails if one plugin unload operation fails 2018-04-21 16:47:58 +02:00
James Booth
70c70fcdf9 Fix theme load max tab length 2018-03-11 01:21:36 +00:00
James Booth
d6e7f389d1 Add max tab length to statusbar 2018-03-11 01:18:46 +00:00
James Booth
9f24f6083b Fix utf8 chars in statusbar 2018-03-11 00:46:27 +00:00
James Booth
b01dd7c48b Default tab name to false 2018-03-10 23:31:02 +00:00
James Booth
aa520f4f7c Add statusbar pref to themes 2018-03-10 23:22:58 +00:00
James Booth
8718b368a1 Statusbar render at start of small window 2018-03-10 23:01:51 +00:00
James Booth
b0e70e6caa Dont show extended tabs when max 0 2018-03-10 22:54:02 +00:00
James Booth
4bf67fb35a Use jid prefs in statusbar 2018-03-10 22:41:55 +00:00
James Booth
95b639a21f WIP add self prefs for statusbar 2018-03-10 22:16:52 +00:00
James Booth
b38f6ba512 Do not highlight room tab on subject change 2018-03-10 16:58:52 +00:00
James Booth
b7cb527608 Tidy windows when closing room config 2018-03-10 01:48:43 +00:00
James Booth
5dbddf4d43 Show extended tabs 2018-03-10 01:30:28 +00:00
James Booth
73bb628fd8 Refactor statusbar 2018-03-10 00:32:56 +00:00