The ctype functions are error prone. The argument is an int which must
be in the range of an unsigned char and is interpreted based on the
locale:
These functions check whether c, which must have the value of
an unsigned char or EOF, falls into a certain character class
according to the specified locale. The functions without the
"_l" suffix perform the check based on the current locale.
Fix rlimit process restriction in commit 29d29f21:
* fd 1 is opened by the parent: enforce restrictions at startup
* enable RLIMIT_FSIZE if fd 2 is not a regular file
* fix compile error
libstrophe 0.12 supports (and enables by default) stream management. The
xmppipe session disconnects when strophe and xmppipe both try to handle
the stream acknowledgement.
* disable strophe stream management
* TODO: if strophe SM is available, disable xmppipe SM
The default resource is "xmppipe". A subsequent xmppipe using the default
resource connects to the groupchat will be disconnected.
* reduce the amount of configuration needed for scripts
* make the resource unique on the same host by appending the PID
One to one chats with a username without a domain would echo back
messages. Use the domain from the user's JID:
```
xmppipe -u user1@example.com --chat user2
```
Update syscalls in seccomp policy for termux on android 12. With this
change, xmppipe works with the seccomp process restrictions on termux
but will still crash on exit:
* prctl(PR_SET_VMA): prctl(2) is not allowed by the stdin restrictions
* if prctl(2) is allowed, xmppipe aborts with "bad syscall" on exit. The
system call doesn't show up in strace(1).
~~~
In file included from src/restrict_process_capsicum.c:16: /usr/include/sys/capability.h:44:2: warning: this file includes <sys/capability.h> which is deprecated [-W#warnings]
^
1 warning generated.
~~~
Add initial support for XEP-0363. HTTP uploads can be used when colon
separated values for stdin is enabled:
~~~
u::::<filename>|<size (bytes)>[|<content-type>]
u::::example.png%7C16698
u::::tr.png%7C16698%7Cimage%2Fpng
~~~
The reponse:
~~~
U:upload.example.com:user@example.com/477937350262208314215778:https%3A%2F%2Fexample.com%2Fupload%2F1234%2Fabc%2Fexample.png%7Chttps%3A%2F%2Fexample.com%2Fupload%2F1234%2Fabc%2Fexample.png
~~~
TODO:
* support PUT header elements
* support/test error conditions
Questions:
* save the maximum file size returned by the server and disallow uploads
larger than the value?
* xmppipe is "pinned" to the upload server returned in the IQ reply (the
"to" field is ignored)
* allow other upload servers?
* error if different upload server is specified in "u:<from>:<to>"?
When using the csv input format, add a new format ('u') that wraps the
message in an "x:oob" element. The image will be displayed inline by
Conversations.
~~~
u:groupchat:::https%3A%2F%2Fhttpstatusdogs.com%2Fimg%2F500.jpg
~~~