Michael Vetter
98f768bdc2
Add occupants wrap to help
2019-04-24 09:49:14 +02:00
Michael Vetter
259c5801cf
Fix occupants header char message
2019-04-24 09:49:14 +02:00
Michael Vetter
125ca2f0d2
Add occupants wrap option
...
Wrapping for the occupants panel like already exists for the roster
panel. See `/occupants wrap on`.
Regards https://github.com/boothj5/profanity/issues/690
2019-04-24 09:49:14 +02:00
kaffeekanne
f8640019f3
Update copyright years
2019-04-24 01:08:38 +02:00
Michael Vetter
028839e35a
Put occupants update into own function
2019-04-23 14:13:08 +02:00
Michael Vetter
566022786d
Add occupants header char
...
`/occupants header char` now sets a character that is displayed before
the role (moderator, visitor..) in a room. Similar to `/roster header
char` is displaying a char for the roster.
Regards https://github.com/boothj5/profanity/issues/690
2019-04-23 14:13:03 +02:00
kaffeekanne
49e2838a98
Fix indentation for time config
2019-04-23 12:39:05 +02:00
Michael Vetter
d520667935
Adjust jid for occupants indent
...
Indent the jid one more space than nick.
2019-04-20 20:35:45 +02:00
Michael Vetter
2b0e75ce35
Add occupants indent autocompletion
2019-04-20 20:35:45 +02:00
Michael Vetter
62c23233f7
Allow setting occupants indent outside of MUC
...
And when not connected.
2019-04-20 20:35:37 +02:00
Michael Vetter
0c248a0b16
Add /occupants indent command
...
Roster has a `/roster contact indent` option.
Now we have the same for occupants. So contacts in roster and in MUC can
have configurable indentation.
Regards https://github.com/boothj5/profanity/issues/690
2019-04-18 20:53:02 +02:00
Michael Vetter
7e4e9e6688
Fix typo in /help roster
2019-04-18 17:05:10 +02:00
Michael Vetter
199e8752ca
Merge pull request #1063 from paulfariello/hotfix/presence-before-roster
...
Handle presence received before roster
2019-04-17 20:47:54 +02:00
Michael Vetter
2f6387f3fa
Set correct year in copyright display
...
Fixes https://github.com/boothj5/profanity/issues/1069
2019-04-17 20:44:39 +02:00
Paul Fariello
db55e01dce
Follow OMEMO policy even when opening window on message and carbon reception
...
This should close #1052
2019-04-17 15:54:15 +02:00
Paul Fariello
973a05d15a
Handle presence received before roster
...
Presence of contact not found in roster are filtered out.
But sometimes roster is received after a first few presences.
We choose to store presences until we receive roster and then process
this presences.
Fixes #1050
2019-04-17 14:19:31 +02:00
Paul Fariello
21ae946896
Handle MUC anonymous state when auto starting OMEMO
...
When auto joining a MUC we don't have access to required information so
we just don't start OMEMO at this time.
Once we receive disco info we then try to start OMEMO.
2019-04-17 14:03:14 +02:00
Paul Fariello
a6eb0d2c43
Handle missing real jid in OMEMO encrypted MUC
...
This should never happens since we should ensure MUC is Non-Anonymous
before enabling OMEMO.
But we should neither segfault if this happens.
2019-04-17 14:03:14 +02:00
Paul Fariello
5f015e32b2
Add OMEMO policy
...
There is 3 policy:
- manual: OMEMO session are only started manually
- automatic: OMEMO session are only started if they have been started
manually before
- always: OMEMO session are always started unless they have been ended
manually before
Closes #1040 and fixes #1052
2019-04-17 14:03:14 +02:00
Michael Vetter
9574127177
Merge pull request #1066 from paulfariello/hotfix/OMEMO-ensure-muc-is-nonanonymous
...
Ensure MUC is Non-Anonymous before starting OMEMO
2019-04-17 13:58:45 +02:00
Paul Fariello
8c71a74afe
Ensure MUC is Non-Anonymous before starting OMEMO
...
Store MUC anonymous type in mucwin for that purpose.
Fixes #1065
2019-04-17 13:56:27 +02:00
Paul Fariello
fc8dc328a4
Alert about long OMEMO cryptographic generation
...
Fixes #1055
2019-04-17 09:55:16 +02:00
Michael Vetter
02d0f7fc38
Merge pull request #1061 from paulfariello/hotfix/handle-message-without-id-in-muc
...
Handle message without id in MUC
2019-04-15 10:43:39 +02:00
Paul Fariello
9c0a395408
Don't persist OMEMO {signed,}prekey cleaning on disconnect
...
We should not remove signed prekey and prekey from persistent storage
when cleaning OMEMO store on disconnect.
2019-04-14 22:03:16 +02:00
Paul Fariello
94a39b2e9b
Handle malformed OMEMO identity.txt
...
If OMEMO identity.txt is malformed just abort loading.
User should be able to call `/omemo gen` again.
2019-04-14 22:03:16 +02:00
Paul Fariello
c33d8e5f0b
Don't unload OMEMO cryto on disconnect if OMEMO wasn't loaded
...
If OMEMO wasn't loaded, removing key would create empty identity.txt
file. Then at load time it would segfault profanity.
Another commit should fix load of malformed identity.txt.
2019-04-14 22:03:16 +02:00
Paul Fariello
cdc0290a59
Handle message without id in MUC
...
Some clients seems to send message without id.
2019-04-14 21:53:26 +02:00
Paul Fariello
9714d1d867
Add random string at the end of the default resource
...
When connecting for the first time or when creating a new account don't
use only 'profanity' as default resource.
Some server don't support having 2 connection with same resource. Using
profanity as default lead to deconnections.
2019-04-12 15:49:54 +02:00
Paul Fariello
f75e1d7a7b
Support contact name in /omemo fingerprint command
2019-04-10 17:24:56 +02:00
Paul Fariello
ad21021ce7
Fix issue with first encrypted message
...
When decrypting first message with prekey, libsignal wants to remove
used prekey from storage. Return value on success should be 0.
We used to return number of deleted keys. Thus libsignal was considering
we failed to remove the key and we were ignoring plaintext.
2019-04-10 17:24:56 +02:00
Paul Fariello
df648ba959
Try to start sessions with every jid in roster
2019-04-10 17:24:56 +02:00
Paul Fariello
f9b2fdc7db
OMEMO should be written uppercase
2019-04-10 17:24:56 +02:00
Paul Fariello
381d85bcca
Fix build on travis
2019-04-10 17:24:56 +02:00
Paul Fariello
277e8dc901
Add /omemo char command
2019-04-10 17:24:56 +02:00
Paul Fariello
0bc660400b
Automatically starts OMEMO if one identity is trusted
2019-04-10 17:24:56 +02:00
Paul Fariello
25eb138d0b
Rework trusted fingerprint storage
...
Stop using "jid:device_id" keys. And move long term storage to its own
file: trust.txt.
2019-04-10 17:23:46 +02:00
Paul Fariello
4ad6904216
Wait for discovery end to publish omemo devicelist and bundle
...
Add sv_ev_connection_features_received for that purpose
2019-04-10 17:23:46 +02:00
Paul Fariello
01e96769c2
Prefix static function with _
2019-04-10 17:23:46 +02:00
Paul Fariello
0f4dd61776
Ensure pre keys are generated if missing from long term storage
2019-04-10 17:23:46 +02:00
Paul Fariello
e69f947547
Rework MUC reflected message filtering
...
Reflected messages can't be filtered by nick only otherwise you might
ignore messages comming from you on another devices.
Consequently we maintain a list of sent messages id in mucwin.
To be sure the id will be correctly reflected we use the origin-id
stanza.
2019-04-10 17:23:46 +02:00
Paul Fariello
e7be3a605b
Add OMEMO in prefs command
2019-04-10 17:23:46 +02:00
Paul Fariello
65b3f82c5f
Fix devicelist notification handler
...
devicelist handler should be kept after trigger
2019-04-10 17:23:46 +02:00
Paul Fariello
898302243e
Add clear_device_list command
2019-04-10 17:23:46 +02:00
Paul Fariello
5cd2b8dc9d
Permanently store pre keys
2019-04-10 17:23:46 +02:00
Paul Fariello
0d0e2b246a
Add support for missing from in bundle iq
2019-04-10 17:23:45 +02:00
Paul Fariello
562302846a
Handle bundle publication error on publish-options
...
We try to reconfigure node and publish again.
If it fails again then we give up.
2019-04-10 17:23:45 +02:00
Paul Fariello
904528b490
Ensure signal context is built on connection
...
We can't keep it between two connection because signal context is
specific to a given account.
2019-04-10 17:23:45 +02:00
Paul Fariello
075d4cf35b
Don't use glib 2.58 func
2019-04-10 17:23:45 +02:00
Paul Fariello
2015ba201d
Ensure encrypted carbon of own message are marked as encrypted
2019-04-10 17:23:45 +02:00
Paul Fariello
4a1c3c8c1e
Show all device fingerprint for current account
2019-04-10 17:12:31 +02:00
Paul Fariello
ba9679a706
Print fingerprint after trust and untrust command
2019-04-10 17:12:31 +02:00
Paul Fariello
bc16ba1669
Temporarly disable check for publish-options support
2019-04-10 17:12:31 +02:00
Paul Fariello
678bff9169
Add fingerprint autocompletion
2019-04-10 17:12:31 +02:00
Paul Fariello
3d8f47a724
Use /omemo fingerprint to show contact fingerprints
...
Don't print fingerprints when they are received
2019-04-10 17:12:31 +02:00
Paul Fariello
2fd2ca208c
Use connection_support to check for publish-options support
2019-04-10 17:12:31 +02:00
Paul Fariello
306706bd2e
Add OMEMO log command
2019-04-10 17:12:31 +02:00
Paul Fariello
dadd0c0590
Add missing preferences for OMEMO logs
2019-04-10 17:12:31 +02:00
Paul Fariello
91ee289c77
Add support for disconnect in OMEMO
2019-04-10 17:12:31 +02:00
Paul Fariello
bc541cb8ac
Add OMEMO end command
2019-04-10 17:12:31 +02:00
Paul Fariello
9a66e74986
Handle absent muc member
2019-04-10 17:12:31 +02:00
Paul Fariello
70109953ec
Revert "Ensure room isn't anonymous"
...
This reverts commit 733e1a24c7e08dde6aa2c15ec4528220aa360845.
2019-04-10 17:12:31 +02:00
Paul Fariello
d8f0bcef94
Add publish option to OMEMO device list and bundle
2019-04-10 17:12:31 +02:00
Paul Fariello
9044e3732c
Ensure room isn't anonymous
2019-04-10 17:12:31 +02:00
Paul Fariello
e5b01ed71b
Add OMEMO state in titlebar in MUC
2019-04-10 17:12:31 +02:00
Paul Fariello
88670a7f0b
Add OMEMO state in titlebar
2019-04-10 17:12:31 +02:00
Paul Fariello
4e1ffa6bdb
Log and print outgoing encrypted message
2019-04-10 17:12:31 +02:00
Paul Fariello
a9d55dec92
Add support for sending encrypted message in MUC
2019-04-10 17:12:31 +02:00
Paul Fariello
f7ce1607f9
Ensure saved_account is set before calling sv_ev_login_account_success
2019-04-10 17:12:31 +02:00
Paul Fariello
031e906035
Cosmetics rename variable barejid into roomjid
2019-04-10 17:12:31 +02:00
Paul Fariello
cf528383bd
Allow to start OMEMO in MUC
2019-04-10 17:12:31 +02:00
Paul Fariello
21f247d0eb
Handle window type MUC in OMEMO start command
2019-04-10 17:12:31 +02:00
Paul Fariello
a3897abba1
Add MUC message decryption
2019-04-10 17:12:31 +02:00
Paul Fariello
33b0b46420
Fix prekey handling after first use
...
libsignal will remove prekey on its own.
2019-04-10 17:12:31 +02:00
Paul Fariello
319fb856e0
Handle decrypted OMEMO messages as such
2019-04-10 17:12:31 +02:00
Paul Fariello
3e325a61c3
Add support for OMEMO, OTR, PGP built together
2019-04-10 17:12:31 +02:00
Paul Fariello
0dd5441f92
device_list iq should be from barejid or none
...
Ensure we request device_list and remove non conforming handling of
responses.
Move initialisation of iq_handlers before call to sv_ev_login_account_success
2019-04-10 17:12:31 +02:00
Paul Fariello
6bb7deeb9c
Add logs about crypto generation
2019-04-10 17:12:31 +02:00
Paul Fariello
197e098f4b
Log device_id on startup
2019-04-10 17:12:31 +02:00
Paul Fariello
4826da3aa6
Don't rely on account name being jid
2019-04-10 17:12:31 +02:00
Paul Fariello
8952684472
Add hints about trust command when printing fingerprints
2019-04-10 17:12:31 +02:00
Paul Fariello
2455bcc28a
Avoid using xmpp_jid_bare
2019-04-10 17:12:31 +02:00
Paul Fariello
5d90199a41
Avoid opening win if crypto materials are missing
2019-04-10 17:12:31 +02:00
Paul Fariello
89ece4f235
Add UI feedback for OMEMO gen command
2019-04-10 17:12:31 +02:00
Paul Fariello
2622c2d21a
Add OMEMO untrust command
2019-04-10 17:12:31 +02:00
Paul Fariello
36ce21fc6d
Add store hints for OMEMO encrypted messages
...
Store hints are required has some server might discard messages without
body. Here we ensure OMEMO messages are stored on server and delivered
to client when they connect back.
It's really important since it avoid libsignal to desynchronize
counters.
2019-04-10 17:12:31 +02:00
Paul Fariello
dbf96dcfc6
Allow to trust own device id
2019-04-10 17:12:31 +02:00
Paul Fariello
063a5d1c52
Add trust command
2019-04-10 17:12:31 +02:00
Paul Fariello
23485eb4e7
Don't trust unknown identity keys
...
Also add long terme storage of known identity keys.
If a key is stored it means it is trusted.
2019-04-10 17:12:31 +02:00
Paul Fariello
249701fe7a
Add OMEMO status in build information
2019-04-10 17:12:31 +02:00
Paul Fariello
97c661271b
Add support for libsignal-protocol-c 2.3.2
2019-04-10 17:12:31 +02:00
Paul Fariello
b3be504e84
Add OMEMO fingerprint command
2019-04-10 16:31:45 +02:00
Paul Fariello
55407ee15f
Add OMEMO session long term storage
2019-04-10 16:31:45 +02:00
Paul Fariello
5eb66aea26
Replace used prekey in bundle
2019-04-10 16:31:45 +02:00
Paul Fariello
1b5848fb23
Start new session upon prekey reception
2019-04-10 16:31:45 +02:00
Paul Fariello
bf8b89c568
Randomly choose a prekey on session build
2019-04-10 16:31:45 +02:00
Paul Fariello
ba0fa6e536
Add OMEMO commands autocompletion
2019-04-10 16:31:45 +02:00
Paul Fariello
2718183d27
Enable start of OMEMO in existing chat win
2019-04-10 16:31:45 +02:00
Paul Fariello
da0376a6a9
Check received gcm tag
2019-04-10 16:31:45 +02:00
Paul Fariello
b0c52f84ab
Follow xep by putting gcm tag on encrypted key
2019-04-10 16:31:45 +02:00
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