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

6370 Commits

Author SHA1 Message Date
Michael Vetter
fde0a0d1c6 Add support to register with a room
`/affiliation register` can now be used to register a nickname with a
MUC.

Tested with a server without forms. Couldn't find a server which
supports forms yet.

Implements https://github.com/profanity-im/profanity/issues/1210
2021-03-25 11:05:58 +01:00
Michael Vetter
064174efa3 debug build: build without -fsanitize=address
Sorry :-)
Seems then we can't use valgrind since that does its own ASAN things.

So maybe developers needs to set some flags by themselves to find these
memory issues.

https://fuzzing-project.org/tutorial-cflags.html might be of help.

Regards: https://github.com/profanity-im/profanity/issues/1512
2021-03-24 17:20:54 +01:00
Michael Vetter
5f7840bc3f debug build: build with -fsanitize=address
Let's compile with this flag to detect memory erros in the debug build.

See https://clang.llvm.org/docs/AddressSanitizer.html

Regards: https://github.com/profanity-im/profanity/issues/1512
2021-03-24 17:08:19 +01:00
Michael Vetter
18172f5260
Merge pull request #1511 from mwuttke97/doc_bookmark_join
Command doc: Improve description and examples of `/bookmark` and `/join`
2021-03-24 14:31:22 +01:00
Maximilian Wuttke
b8f3e8e0ac Command doc: Improve description and examples of /bookmark and /join 2021-03-21 10:59:06 +01:00
Michael Vetter
051e31ffc0
Merge pull request #1508 from profanity-im/fix/1507-voice-accept
Support to approve MUC voice requests
2021-03-17 16:36:44 +01:00
Michael Vetter
ebb1be9e58 form.c: fix memleak in form_tag_exists 2021-03-17 16:18:56 +01:00
Michael Vetter
5cec47c86a Add support to approve MUC voice requests
A form will open. One can then use `/field4 on` `/form submit`.

Implements https://github.com/profanity-im/profanity/issues/1507
2021-03-17 16:16:59 +01:00
Michael Vetter
5d2037aa0c profanity.c: move var into function 2021-03-16 14:41:52 +01:00
Michael Vetter
0044da01ee
Merge pull request #1504 from xenrox/request-voice
MUC: Add voice request
2021-03-16 13:15:38 +01:00
Thorben Günther
ec6f9df486
MUC: Add voice request
closes https://github.com/profanity-im/profanity/issues/1211
2021-03-12 14:57:00 +01:00
Thorben Günther
dbd8657759
Completion: Split up role and affiliation completion
Needed for affiliation request
2021-03-12 14:49:20 +01:00
Michael Vetter
cb0adae63a Dont build paths manually in cmd_funcs.c
Some time ago we introduced get_expanded_path().
No need to build paths manually anymore to get ~.
2021-03-12 10:29:06 +01:00
Michael Vetter
537b14da50
Merge pull request #1503 from profanity-im/cleanup/autocomplete-1
Cleanup autocomplete
2021-03-12 09:00:34 +01:00
Michael Vetter
638a50f8d1 autocomplete: remove duplicate code in search functions
_search_next and _search_prev where exactly the same except taking the
nex/prev from the list.
Use one function with a direction argument.
2021-03-11 22:24:27 +01:00
Michael Vetter
e3133ed98f autocomplete: Use asprintf don't calculate length twice
Through asprintf() we can get rid of malloc() + sprintf().
Also we don't need to calculate the strlen() again since asprintf()
returns the bytes printes.

Only non UTF-8 characters. But that was true before already.
2021-03-11 22:24:02 +01:00
Michael Vetter
c1ccaee58f Remove duplicate code in autocomplete_param*
autocomplete_param_with_func and -autocomplete_param_with_ac had lots of
duplicate code.
2021-03-11 22:08:04 +01:00
Michael Vetter
7e6b9f4e0a
Merge pull request #1502 from xenrox/fix-unused-return
Upload: Fix unused return
2021-03-11 21:21:23 +01:00
Thorben Günther
c29343b811
Upload: Fix unused return 2021-03-11 21:05:35 +01:00
Michael Vetter
a7ecda7773
Merge pull request #1501 from xenrox/change-password
Add command to change password of logged in user
2021-03-11 18:18:03 +01:00
Thorben Günther
b0aea2bcff
Add command to change password of logged in user 2021-03-11 17:42:53 +01:00
Michael Vetter
7d6f01df86
Merge pull request #1500 from mwuttke97/bugfix/1499
Fix HTTP upload
2021-03-11 17:35:02 +01:00
Maximilian Wuttke
e217ed0b79 Update to the newest version of XEP 0363 (HTTP Upload)
Main changes:

1. Attributes instead of tags
2. Read the optional <header> tags and send them in the HTTP PUT header:

   * Authorization
   * Cookie
   * Expires

Co-authored-by: Martin Dosch <martin@mdosch.de>
2021-03-11 17:11:22 +01:00
Thorben Günther
71236a0d5a
Update ui_ask_password to support confirmation
Just prints a different string to console.
Useful for changing passwords or account registration.
2021-03-11 14:40:17 +01:00
Michael Vetter
96580f917b
Merge pull request #1496 from mwuttke97/omemo-bugfixes
[OMEMO]: Fix bundle publishing
2021-03-10 11:01:35 +01:00
Michael Vetter
0daa7f4a82
Merge pull request #1498 from mwuttke97/send_file_remove_protocol
Remove "file://" from file names
2021-03-10 09:34:42 +01:00
Maximilian Wuttke
1576ac11cb Remove "file://" from file names
Rationale: When copying an image in some application, a URL instead of a
path is copied to the clipboard.
2021-03-09 20:45:29 +01:00
Maximilian Wuttke
2b1ada7722 [OMEMO]: Fix bundle publishing
Use the following options in `omemo_bundle_publish()`:

- "pubsub#persist_items" = "true"
- "pubsub#access_model" = "open"

The same options are also used in Gajim.

I've tested this on two different servers. The bundle was successfully
added as a new PEP node. Test cases:

1. Normal use on my main account
2. Log in into a fresh tesst account on a different server
3. `/omemo clear_device_list`. In this case, the client(s) may have to
   be restarted.

Note: In `_omemo_bundle_publish_result`, there's a route that is taken
when the bundle publish stanza failed. In this case, the node is
configured manually, i.e. the access_model is set to 'open'. I have
manually tested this case, but this case didn't naturally occur for me.

Note: The option "pubsub#max_items=max" is REQUIRED for the bundle
publication, as per XEP-0384. However, this is not done in other clients
(I've checked the source code of Gajim and Conversations), and it is
also not supported by Prosody. Cf. <https://github.com/xsf/xeps/pull/988>.
2021-03-09 17:48:29 +01:00
Maximilian Wuttke
68469149cd Logging [OMEMO]
Also "handle" some errors in `_omemo_bundle_publish_configure` if the
stanzas can't be found
2021-03-09 17:47:43 +01:00
Maximilian Wuttke
4124856100 Variadic version of stanza_attach_publish_options 2021-03-09 17:47:37 +01:00
Maximilian Wuttke
8481698705 Logging [OMEMO] 2021-03-09 17:47:27 +01:00
Stefan
637c2c2d62 Logging [CONNECTION] 2021-03-09 17:47:22 +01:00
Stefan
fb4aec752f Changes logging format to [OMEMO] 2021-03-09 17:47:22 +01:00
Stefan
b460d427bc OMEMO - Removed start session after roster received
Reduce the request during startup of profanity
Removed omemo_start_sessions from sv_ev_roster_received
2021-03-09 17:47:22 +01:00
Michael Vetter
a4ec8530a9
Merge pull request #1497 from xenrox/improve-doc
Cmd definitions: Add offline option to occupants
2021-03-08 20:21:14 +01:00
Thorben Günther
2dd909babb
Cmd definitions: Add offline option to occupants 2021-03-08 19:15:24 +01:00
Michael Vetter
c8dba32760
Merge pull request #1495 from xenrox/offline-members
MUC: Show offline members in sidebar
2021-03-08 15:35:28 +01:00
Thorben Günther
f1780f0017
MUC: Show offline members in sidebar 2021-03-08 14:34:59 +01:00
Michael Vetter
8190301a67 Prevent segfault in sv_ev_incoming_message()
Regards https://github.com/profanity-im/profanity/issues/1488

Actually I would have loved to see the stanza that caused the segfault
since I'm not entirely sure whether this actually means that we do
something wrong earlier on.

Right now I don't know why the to_jid should be empty.

Let's prevent the segfault for now and see whether we get further
bugreports later.

Segfaulting issue got introduced with dd566d8d56.
2021-03-05 12:31:27 +01:00
Michael Vetter
f025bceda3
Merge pull request #1493 from akce/wintitle-libc
Draw wintitle using fputs and fprintf instead of /bin/echo.
2021-03-05 12:10:25 +01:00
Akce
f3e080e268
Draw wintitle using fputs and fprintf instead of /bin/echo. 2021-02-28 07:43:26 +11:00
Michael Vetter
5c5c453219 Disable Tumbleweed CI
```
 (248/297) Installing: system-group-hardware-20170617-19.2.noarch [..error]
Installation of system-group-hardware-20170617-19.2.noarch failed:
Error: Subprocess failed. Error: RPM failed: ERROR: neither groupadd nor busybox found!
error: %prein(system-group-hardware-20170617-19.2.noarch) scriptlet failed, exit status 1
error: system-group-hardware-20170617-19.2.noarch: install failed

Abort, retry, ignore? [a/r/i] (a): a
Warning: %posttrans scripts skipped while aborting:
    pam-1.5.1-2.2.x86_64.rpm
    shadow-4.8.1-5.2.x86_64.rpm
```

Seems to be a bug in old docker/libseccomp from GH.
2021-02-17 19:30:26 +01:00
Michael Vetter
3def839c0e Disable Arch CI
Again something wrong this Arch.
Not time to invest right now but we need a working CI for PRs.
2021-02-17 16:24:59 +01:00
Michael Vetter
b170fcb55f
Merge pull request #1484 from kaffeekanne/calm-openbsd-syslog
Calm OpenBSD syslog
2021-02-15 17:13:03 +01:00
kaffeekanne
49dc9c5755 Calm OpenBSD syslog
On every write to `chatlog.db` syslog throws
```
profanity: vfprintf %s NULL in "INSERT INTO `ChatLogs` (`from_jid`,
`from_resource`, `to_jid`, `to_resource`, `message`, `timestamp`,
`stanza_id`, `archive_id`, `replace_id`, `type`, `encryption`) SELECT
'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' WHERE
NOT EXISTS (SELECT 1 FROM `ChatLogs` WHERE `archive_id` = '%s')"
```
in `/var/log/messages`. Checking for `NULL` except in the fields the DB
is expected to throw errors for, satisfies OpenBSDs security measures
2021-02-15 15:58:35 +01:00
Michael Vetter
69e923df3b Remove forgotten debug line 2021-02-15 09:58:37 +01:00
Michael Vetter
3fb26f1e4e
Merge pull request #1481 from StefanKropp/titlebar-empty-roomname
Bugfix: Titlebar show name without room name
2021-02-14 21:36:00 +01:00
Stefan
45e4d26296 Bugfix: Titlebar show name without room name
Error log:
GLib-CRITICAL - g_string_insert_len: assertion 'len == 0 || val != NULL' failed

Check if a room name exists, before adding the name into the title bar.
2021-02-14 21:00:05 +01:00
Michael Vetter
79fbd403a7 Correct command synopsis for mam 2021-02-09 11:31:08 +01:00
Michael Vetter
1435c7ae14 Use correct time for MAM messages
We need the delay value from the <forward> element.

Regards https://github.com/profanity-im/profanity/issues/660
2021-02-04 21:13:31 +01:00