1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00
Commit Graph

6190 Commits

Author SHA1 Message Date
Pierre Mazière
c56d530b67 Replace /urlopen with /url and adapt /executable
/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>
2020-06-25 15:03:04 +02:00
Pierre Mazière
7e652f4ca0 Add string and string list preferences with option
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>
2020-06-25 15:03:04 +02:00
Pierre Mazière
96c877de80 Refactor cmd_urlopen
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-25 15:03:01 +02:00
Pierre Mazière
64eb11fbaf Add aesgcm to urls grabber
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-25 15:02:56 +02:00
Michael Vetter
906c020155 Start new cycle 2020-06-24 13:57:05 +02:00
Michael Vetter
1332a4a6c2 Release 0.9.4 2020-06-24 13:56:34 +02:00
Michael Vetter
34be63f514
Merge pull request #1373 from profanity-im/cygwin-notify
Fix gcc warnings for cygwin
2020-06-24 13:50:24 +02:00
Dmitry Podgorny
09e12a826f Fix gcc warnings for cygwin
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.
2020-06-24 16:29:19 +03:00
Michael Vetter
5d8f3f2791
Merge pull request #1372 from profanity-im/missed-string-h
Add missed string.h
2020-06-24 09:51:54 +02:00
Dmitry Podgorny
ca3da61776 Add missed string.h
strdup(3) requires string.h
2020-06-24 03:07:53 +03:00
Michael Vetter
b79d7e8752 Fix NULL terminated list
Regards https://github.com/profanity-im/profanity/issues/1367
2020-06-23 14:42:09 +02:00
DebXWoody
b7f959bab4
Clean-up: defines cmd_funcs.c 2020-06-20 06:45:40 +02:00
DebXWoody
c81931c35d
Cleanup defines - client_events.c 2020-06-19 22:05:31 +02:00
Michael Vetter
9eb2b79f53 Start new cycle 2020-06-19 20:34:29 +02:00
Michael Vetter
177c953991 Release 0.9.3 2020-06-19 20:29:31 +02:00
Michael Vetter
448f7f0936 Use shell to start eval_password command
Since d92c576aa5
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
2020-06-19 20:17:20 +02:00
Michael Vetter
cffce4de8a
Merge pull request #1365 from profanity-im/segfault
Fix possible segfault in xmpp/message.c
2020-06-16 14:25:50 +02:00
Dmitry Podgorny
409bbd6f2d Fix possible segfault in xmpp/message.c
Check for pointer to be NULL before dereferencing it.
2020-06-16 17:52:01 +03:00
DebXWoody
fa9ef70037
Clean-up task: clean up feature defines 2020-06-14 12:12:29 +02:00
Michael Vetter
5d5acd65b1 Start new cycle 2020-06-13 18:38:37 +02:00
Michael Vetter
c58726d67f Release 0.9.2 2020-06-13 18:37:51 +02:00
Michael Vetter
e07da412b7 Use gnu99 standard
With recent changes to c99 and -D_POSIX_C_SOURCE=200809L we get the following:

openSUSE TW CI sais:
```
Now you can run `make' to build profanity

In file included from /usr/include/python2.7/Python.h:8,

                 from src/plugins/python_plugins.c:37:

/usr/include/python2.7/pyconfig.h:1226: error: "_POSIX_C_SOURCE" redefined [-Werror]

 1226 | #define _POSIX_C_SOURCE 200112L

      |

<command-line>: note: this is the location of the previous definition

In file included from /usr/include/python2.7/Python.h:8,

                 from src/plugins/python_api.c:37:

/usr/include/python2.7/pyconfig.h:1226: error: "_POSIX_C_SOURCE" redefined [-Werror]

 1226 | #define _POSIX_C_SOURCE 200112L

      |

<command-line>: note: this is the location of the previous definition

cc1: all warnings being treated as errors
```

OpenBSD CI sais:
```
cc1: warnings being treated as errors
src/database.c: In function 'log_database_get_previous_chat':
src/database.c:226: warning: implicit declaration of function 'asprintf'
gmake[1]: *** [Makefile:1924: src/database.o] Error 1
gmake[1]: Leaving directory '/home/build/profanity'
gmake: *** [Makefile:1211: all] Error 2
```

Let us use gnu99. Has been proposed before already and is fine.

Regards https://github.com/profanity-im/profanity/issues/1357
Regards https://github.com/profanity-im/profanity/pull/1351
2020-06-13 15:58:01 +02:00
Michael Vetter
914c6752dd Fix reading/writing linked files
"base" was not really base but the filename :-)

Fix https://github.com/profanity-im/profanity/issues/1362
2020-06-13 15:02:43 +02:00
Michael Vetter
74e061165a Define POSIX macro to have strdup
98c38dc6d6
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
2020-06-12 16:12:21 +02:00
Michael Vetter
f1141932fc Dont manipulate pointer from getenv
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.
```
2020-06-12 10:23:31 +02:00
Michael Vetter
74ff38f0bd Start new cycle 2020-06-11 10:07:51 +02:00
Michael Vetter
8551d3dcb1 Release 0.9.1 2020-06-11 10:06:56 +02:00
Michael Vetter
be0b5bb2d1
Merge pull request #1360 from profanity-im/legacy-auth
Make legacy auth optional
2020-06-11 08:54:05 +02:00
Dmitry Podgorny
424918c5ed Make legacy auth optional
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.
2020-06-11 02:51:07 +03:00
Michael Vetter
c0163f71f7 Start new cycle 2020-06-09 16:54:35 +02:00
Michael Vetter
c4339b4ff9 Release 0.9.0 2020-06-09 16:52:09 +02:00
Michael Vetter
08e035dea0 Improve CHANGELOG 2020-06-09 16:42:24 +02:00
Michael Vetter
439c6a63b9 Correct and update manpage 2020-06-09 16:34:34 +02:00
Michael Vetter
2d49d68d84 Add 0.9.0 CHANGELOG 2020-06-09 16:25:02 +02:00
Michael Vetter
10cdb06948
Merge pull request #1356 from wstrm/bump-openbsd-6.7
Bump OpenBSD build to 6.7
2020-06-06 15:08:24 +02:00
William Wennerström
4507be2aa8
Bump OpenBSD build to 6.7 2020-06-06 11:53:24 +02:00
Michael Vetter
28bdbf8ea1 Bump libstrophe requirement to 0.9.3
legacy auth (ac410445af) requires
libstrophe 0.9.3 because of XMPP_CONN_FLAG_LEGACY_AUTH.
2020-06-05 19:37:53 +02:00
Michael Vetter
ac7abc5475 readme: test new screenshot 2020-06-05 14:54:39 +02:00
Michael Vetter
46405dc50b
Merge pull request #1355 from profanity-im/iss1236
Add option for legacy authentication
2020-06-05 13:32:11 +02:00
Dmitry Podgorny
ac410445af Add option for legacy authentication
New options:
  /connect <account> [auth default|legacy]
  /account <account> set auth default|legacy

Fixes #1236.
2020-06-05 11:37:51 +03:00
DebXWoody
3232451448
Request Device and Key, when OMEMO is in use
Profanity requests the device list and keys for contacts, also when the user
hasn't generated the OMEMO key. If the user has no OMEMO key, there is no need
to request OMEMO information.

Issue: #1332
2020-06-04 19:57:07 +02:00
Michael Vetter
8c9aee22e8 Correctly check for 'expect'
The expect library doesnt export 'main'. But it exports (and we use)
exp_expectl.
2020-06-04 12:29:49 +02:00
Michael Vetter
12cafe4e60 Add include for waitpid to functionaltest 2020-06-04 12:02:02 +02:00
Michael Vetter
98c38dc6d6
Merge pull request #1351 from toogley/master
Use always c99
2020-06-04 11:28:24 +02:00
Michael Vetter
0071bbb4be
Merge pull request #1349 from profanity-im/autotools
configure.ac: add additional check for libstrophe
2020-06-03 15:15:10 +02:00
Michael Vetter
42eb9ba63d Include mesode.h in libmesode test case
Regards https://github.com/profanity-im/profanity/issues/1334
2020-06-03 14:31:41 +02:00
Michael Vetter
140ac99c0c Fix memleak again
Memleak was reinroduced in d92c576aa5
It was already fixed in ac5ce105ac

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.
2020-06-03 13:21:39 +02:00
Michael Vetter
b7d5b964a2 Merge remote-tracking branch 'peetah/externalCallWithGSpawnSync' into
peetah-external-cmd

Merge peetahs external command calling improvements from his mirror at
https://framagit.org/peetah/profanity.
2020-06-03 13:20:25 +02:00
Pierre Mazière
fad77d9d70 Use external_call to get password via eval_password command
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-03 13:09:29 +02:00
Pierre Mazière
d92c576aa5 Get output and error streams from the command spawned by external_call()
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-03 13:09:29 +02:00