1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00
Commit Graph

6752 Commits

Author SHA1 Message Date
Michael Vetter
186a8b25a0
Merge pull request #1637 from profanity-im/fix-soh-regression
fix handling of connection errors
2022-02-14 11:31:49 +01:00
Steffen Jaeckel
7a2af5e3ad fix handling of connection errors
When a `see-other-host` stream-error is received we try to re-connect to
the other host. Erroneously this also started the `reconnect_timer`.
This lead to the behavior that in cases where e.g. the login failed
we try to reconnect instead of bailing out with an error.

This commit fixes the wrong behavior by not starting the `reconnect_timer`.

Fix 0e58509c16

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-08 19:52:13 +01:00
Michael Vetter
fb91824883
Merge pull request #1635 from arya-pratap-singh/master
Fix typo in comment from "the YES" to "to YES"
2022-02-03 14:11:15 +01:00
arya-pratap-singh
71ac7478ae fixed typo from "the Yes" to "to YES" 2022-02-03 14:25:25 +05:30
Michael Vetter
6d1c661e21 Remove banned muc member from member list
If I'm understing everything right the member should be removed here.
muc_members_update() seems to have been writen for the same purpose.

Fix https://github.com/profanity-im/profanity/issues/1594
2022-02-02 21:57:44 +01:00
Michael Vetter
e0f75e0b52
Merge pull request #1633 from profanity-im/fix-split-url-once-more
Fix `_split_url()` once more
2022-02-02 10:22:04 +01:00
Steffen Jaeckel
569525c6c7 Fix off-by-one
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-01 17:41:19 +01:00
Michael Vetter
832f28bcb2
Merge pull request #1632 from profanity-im/fix-split-url
Fix `_split_url()`
2022-02-01 17:13:50 +01:00
Steffen Jaeckel
ad87bdffc2 add missing IPv6 handling
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-01 16:56:26 +01:00
Michael Vetter
9a1311a826
Merge pull request #1631 from profanity-im/fix-1628
Fix #1628
2022-02-01 16:51:12 +01:00
Steffen Jaeckel
196f20a7d5 add fall-back for older GLib versions
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-01 16:33:22 +01:00
Steffen Jaeckel
0e58509c16 handle see-other-host XMPP stream error
Fixes #1628

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-01 15:52:08 +01:00
Steffen Jaeckel
9cf78e59d5 auto-format
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-01 15:01:28 +01:00
Steffen Jaeckel
20a8ef7a3e session: combine internal free-functions
`_session_free_saved_details()` remains as it's still required alone

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-01 15:01:28 +01:00
Michael Vetter
e31e2877fc command: change user mood clearing message 2022-02-01 00:03:13 +01:00
Michael Vetter
af7a4257f5 command: rename /mood clean to /mood clear
As per suggestion of @mdosch.
2022-02-01 00:00:32 +01:00
Michael Vetter
f14f9afe03 Merge branch 'DebXWoody/usermoodimprovement1' 2022-01-30 18:25:47 +01:00
Michael Vetter
b766807bc3 command: adapt mood description 2022-01-30 18:25:21 +01:00
Stefan Kropp
7a4cfc14d1 XEP-0107: User Mood - Clean mood
* Bugfix in mood_autocomplete (wrong parameter)
 * Implemented /mood clean
 ______________________________________
/ Profanity! THE XMPP client with mood \
\ support!                             /
 --------------------------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/
2022-01-30 18:14:03 +01:00
Michael Vetter
b1929068ff presence: guard against invalid input
It shouldn't happen that we get the presence stanza without a resource.

https://datatracker.ietf.org/doc/html/rfc6120

```
Implementation Note: It is the server's responsibility to deliver
only stanzas that are addressed to the client's full JID or the
user's bare JID; thus, there is no need for the client to check
the 'to' address of incoming stanzas.  However, if the client does
check the 'to' address then it is suggested to check at most the
bare JID portion (not the full JID), since the 'to' address might
be the user's bare JID, the client's current full JID, or even a
full JID with a different resourcepart (e.g., in the case of so-
called "offline messages" as described in [XEP-0160]).
```

Let's not segfault though.

Close https://github.com/profanity-im/profanity/issues/1630
2022-01-27 11:52:23 +01:00
Michael Vetter
fada16bd6d ci: dont verify ssl 2022-01-12 18:59:39 +01:00
Michael Vetter
992f5b800b ci: remove building of stabber
It's not run anyways.
See https://github.com/profanity-im/profanity/issues/789
2022-01-12 16:54:43 +01:00
Michael Vetter
50f0cfd324 ci: git clone from https
```
Cloning into 'stabber'...
fatal: remote error:
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
```
2022-01-11 16:16:12 +01:00
Michael Vetter
81d074be73
Merge pull request #1625 from JurajMlich/master
database.c: fix inserting messages to chat logs if archive_id is empty
2022-01-01 09:54:03 +01:00
Juraj Mlich
c5b370bffc database.c: fix inserting messages to chat logs if archive_id is empty
The original intention of the code was that in case archive_id is not set, NULL should be inserted. What is
inserted however is an empty string. This causes the condition to not insert messages with non-unique
archive_id insert only one message in total and ignore all further ones (if NULL was there, the condition
would work properly). And this in turn causes chat history not work properly.

This commit makes the SQL condition work properly and therefore fixes chat history.

Fixes #1589.
2021-12-31 17:45:45 +01:00
Michael Vetter
a1e0f1d414
Merge pull request #1623 from wstrm/openbsd-build
Upgrade to OpenBSD 7.0 in CI
2021-12-25 10:16:35 +01:00
William Wennerström
5e750e1fbc
Upgrade to OpenBSD 7.0 in CI 2021-12-24 13:49:07 +01:00
Michael Vetter
ed79b074c6
Merge pull request #1622 from a02c1175-5220-4e75-b7a1-18e20548305f/master
use wildcard for man pages in Makefile.am
2021-12-22 12:59:06 +01:00
a02c1175-5220-4e75-b7a1-18e20548305f
46b9428d92
use wildcard for man pages in Makefile.am 2021-12-22 07:44:27 +00:00
Michael Vetter
d4c9a98d71 omemo: log when no pubsub
Closes https://github.com/profanity-im/profanity/issues/1621
2021-12-13 17:11:30 +01:00
Michael Vetter
818e93219e
Merge pull request #1605 from DebXWoody/xep/xep0107-user-mood
xep-0107: User Mood
2021-12-06 14:06:12 +01:00
Michael Vetter
b67054aa39
Merge branch 'master' into xep/xep0107-user-mood 2021-12-06 13:49:04 +01:00
Michael Vetter
6c3e6a5262 xep-0107: adapting the pubsub/headline code
Like mentioned on the review at
https://github.com/profanity-im/profanity/pull/1605 I don't ge why
@DebXWoody changed the code like he did.

I changed it to something that made more sense to me now.
Instead of looking for headline in two places and checking for pubsub in
a headline place (only).

I didn't check this deeply. And still have a feeling that this is not
the best way to go. But I didn't read the XEP yet.

Added a TODO to the code regarding this too.

A quick skimming through https://xmpp.org/extensions/xep-0107.html
doesn't show me anything regarding headline. So I really don't see why
this needs to go here.

Hopefully @DebXWoody checks this in the future. But since he didn't
react on the PR I decided to make some adjustments myself so we can
merge it.
2021-12-06 13:44:04 +01:00
Michael Vetter
67fea6f3c4 xep-0107: adjust help 2021-12-06 13:38:46 +01:00
DebXWoody
2f3de0eb0d xep-0107: code review
* Remarks in the Merge Request (ac_reset, help)
* Defines in iq.c
* Mood help and null check
* Added additional information about tab key in CMD_DESC.
* Added additional null check
2021-12-06 13:33:21 +01:00
Michael Vetter
e745b4af60 tests: add publish_user_mood stub 2021-12-06 13:33:21 +01:00
DebXWoody
23e886ed5e Add xep-0107: User Mood support
Implementation of XEP 0107 - User Mood
2021-12-06 13:32:54 +01:00
Michael Vetter
5355c9b856
Merge pull request #1620 from profanity-im/readd-ci
Re-Enable CI for TW, ubuntu and macos.

For Arch I get:
```
Step 1/24 : FROM archlinux/latest
pull access denied for archlinux/latest, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
```

for both archlinux/latest and archlinux/base.

Let's leave it out :-)
2021-12-03 17:06:14 +01:00
Michael Vetter
05435d2714 ci: re-enable tumblweed
Old docker/libseccomp from GH got updated.

This reverts commit 5c5c453219.
2021-12-03 16:50:00 +01:00
Michael Vetter
8b53acd608 ci: update ubuntu python package names 2021-12-03 16:15:04 +01:00
Michael Vetter
d6633e0920 ci: re-enable ubuntu
This reverts commit cc206ee8cc.
2021-12-03 16:14:26 +01:00
Michael Vetter
a980ab14a0 ci: re-enable macos
They have libstrophe 0.11.0 now.
This reverts commit 472a3ceec4.
2021-12-03 15:56:56 +01:00
Michael Vetter
7a8f0e4873
Merge pull request #1610 from nandesu-utils/master
Fix message encryption for sender devices
2021-11-30 15:31:51 +01:00
Michael Vetter
9efceb8240
Merge pull request #1616 from trofi/master
gcc-12 fixes
2021-11-26 16:43:32 +01:00
Sergei Trofimovich
f0a39a4b66 python_api.c: enlarge c_arguments array to avoid OOB write
Code below explicitly refers past `args_len`th element:

        c_arguments[args_len][0] = NULL;
        c_arguments[args_len][1] = NULL;

Let's always allocate space for `NULL`. Noticed by Steffen Jaeckel.
2021-11-26 07:54:01 +00:00
Michael Vetter
064ee6b1e1
Merge pull request #1618 from profanity-im/fix/1614-otr
Fix carbons criteria
2021-11-25 18:51:46 +01:00
Michael Vetter
2f7317cc18 Fix carbons criteria
We came into the carbons checking code when we received `<private
xmlns="urn:xmpp:carbons:2"/>`. Which actually marks a message to _not_
be a carbon.

In this code we also make sure that carbons only come from us.
If not we don't call the message handler code.

So we should actually only check for `<sent xmlns='urn:xmpp:carbons:2'>`
and `<received xmlns='urn:xmpp:carbons:2'>`.

Thanks pukkamustard and Holger.

Fixes https://github.com/profanity-im/profanity/issues/1614
2021-11-25 15:33:49 +01:00
Michael Vetter
6d2f929950
Merge pull request #1617 from carlocab/osx-configure
Make readline check more portable
2021-11-24 00:36:09 +01:00
Carlo Cabrera
1194a9b85e
Improve macOS Readline checks
Instead of checking for `lib` directories, let's make sure `libreadline`
exists.

Also, let's improve the error message if we can't find it. Finally,
since we're only looking for `brew` on macOS, we don't need to use
`$PATH_SEPARATOR` since we know what the path separator is.
2021-11-24 00:10:05 +08:00
Carlo Cabrera
315d862e22
Make readline check more portable
Currently, `configure.ac` assumes Readline is installed via Homebrew in
`/usr/local`. This doesn't work for Homebrew on Apple Silicon, or
MacPorts.

Let's fix this by checking for a `brew` installation, and querying that
for Readline's prefix if available. If not, it checks for an existing
MacPorts prefix, and finally falls back to checking `/usr/local` in case
a user installed Readline for themselves there.
2021-11-23 21:57:02 +08:00