junker / purple-xmpp-http-upload Goto Github PK
View Code? Open in Web Editor NEWHTTP File Upload plugin for libpurple (XMPP Protocol)
License: GNU General Public License v3.0
HTTP File Upload plugin for libpurple (XMPP Protocol)
License: GNU General Public License v3.0
Hi, it doesn't build on CentOS 7, see below:
purple-xmpp-http-upload]$ make
cc -Wall -I. -g -pipe -fPIC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libpurple -I/usr/include/libxml2 -I./headers/jabber src/hfu_disco.c src/hfu_util.c src/jabber_http_file_upload.c -o jabber_http_file_upload.so -g -pipe -fPIC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libpurple -I/usr/include/libxml2 -I./headers/jabber -lgio-2.0 -lgobject-2.0 -lpurple -lglib-2.0 -lxml2 -lz -lm -ldl -L/usr/lib64/purple-2 -ldl -lm -ljabber -shared
/usr/bin/ld: cannot find -ljabber
collect2: error: ld returned 1 exit status
make: *** [jabber_http_file_upload.so] Error 1
Hi,
Great plugin. I use it actively. Unfortunately, it cannot be build on the latest openSUSE Tumbleweed. collect2 returns the following error:
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: /tmp/ccfemtCN.o:/home/dante/git_ext/purple-xmpp-http-upload/src/jabber_http_file_upload.h:19: multiple definition of `HFUJabberStreamDataTable'; /tmp/cccszgAP.o:/home/dante/git_ext/purple-xmpp-http-upload/src/jabber_http_file_upload.h:19: first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:34: jabber_http_file_upload.so] Error 1
Any help is appreciated.
Is there any support for bitlbee with this plugin?
Steps to reproduce:
"Segmentation fault (core dumped)"
Can you add in the README, the current XEP-0363 version supported (XEP-XXXX v1.2)?
Examples:
make ; make install
cc -Wall -I. -g -pipe -fPIC -pthread -I/usr/include/libpurple -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I./headers/jabber src/hfu_disco.c src/hfu_util.c src/jabber_http_file_upload.c -o jabber_http_file_upload.so -g -pipe -fPIC -pthread -I/usr/include/libpurple -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I./headers/jabber -lgio-2.0 -lgobject-2.0 -lpurple -lglib-2.0 -lxml2 -L/usr/lib/purple-2 -ldl -lm -ljabber -shared
src/jabber_http_file_upload.c: In function ‘jabber_hfu_http_send_connect_cb’:
src/jabber_http_file_upload.c:82:31: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t {aka unsigned int}’ [-Wformat=]
headers = g_strdup_printf("PUT /%s HTTP/1.0\r\n"
^
src/jabber_http_file_upload.c: In function ‘jabber_hfu_send_request’:
src/jabber_http_file_upload.c:210:32: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
filesize = g_strdup_printf("%lu", purple_xfer_get_size(xfer));
^
In file included from src/jabber_http_file_upload.c:7:0:
src/jabber_http_file_upload.c: In function ‘jabber_hfu_xfer_init’:
src/jabber_http_file_upload.c:339:40: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘gsize {aka unsigned int}’ [-Wformat=]
gchar *msg = g_strdup_printf(_("HTTP File Upload maximum file size is %lu bytes"), js_data->max_file_size);
^
/usr/include/glib-2.0/glib/gi18n.h:26:29: note: in definition of macro ‘_’
#define _(String) gettext (String)
^
mkdir -m 0755 -p /usr/lib/purple-2
install -m 0644 jabber_http_file_upload.so /usr/lib/purple-2/jabber_http_file_upload.so
If i send a image with the android app conversations, the image will be shown with image preview (looks like there is some meta data which shows that it is a image instead of plain text).
If i use pidgin with this module to send images, the url will be send as text and, not as image preview.
Is it possible to send the url as image instead of text?
I'm using a combination of plugins with Pidgin to make it a more up to date client, including this plugin and lurch for OMEMO.
In case OMEMO is enabled, the uploaded file itself should be encrypted as well. Is there a way to detect the existence of lurch and do the media encryption on upload?
(Note: I have modified this feature request after understanding that this module purely takes care of uploading, and has nothing to do with downloading.)
This is useful for distributions to fetch static tarballs (which should be created via git archive
and uploaded on the release page). Even git tags may change their content and break distro tarball caching.
XEP-0363 Version 0.7.0 (2018-05-30) says: "The host MUST provide Transport Layer Security", but older versions don't. Some servers do not provide TLS. This plugin does not work on servers providing the HTTP upload service over plain HTTP.
I'd gladly contribute a solution but I'm stuck at radiocane/purple-xmpp-http-upload@9c8fcfe
XEP enabled not on component, but on main server realm.
<iq from='[email protected]/test' id='step_01' to='domain.tld' type='get'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
<iq id='step_01' type='result' to='[email protected]/1debe043-3bc3-4866-9731-7ef7525d69fe' from='domain.tld'>
<query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='skype.domain.tld'/>
<item jid='proxy.domain.tld'/>
<item jid='fb.domain.tld'/>
<item jid='chat.domain.tld'/>
<item jid='pubsub.domain.tld'/>
<item jid='vk.domain.tld'/>
<item jid='icq.domain.tld'/>
<item jid='mra.domain.tld'/>
</query>
</iq>
<iq from='[email protected]/test' id='step_02' to='domain.tld' type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
<iq id='step_02' type='result' to='[email protected]/1debe043-3bc3-4866-9731-7ef7525d69fe' from='domain.tld'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity type='pep' name='Prosody' category='pubsub'/>
<identity type='file' name='HTTP File Upload' category='store'/>
<identity type='im' name='Prosody' category='server'/>
<feature var='urn:xmpp:blocking'/>
<feature var='http://jabber.org/protocol/commands'/>
<feature var='urn:xmpp:mam:0'/>
<feature var='http://jabber.org/protocol/pubsub#publish'/>
<feature var='msgoffline'/>
<feature var='urn:xmpp:carbons:2'/>
<feature var='urn:xmpp:carbons:1'/>
<feature var='jabber:iq:register'/>
<feature var='vcard-temp'/>
<feature var='jabber:iq:roster'/>
<feature var='urn:xmpp:time'/>
<feature var='jabber:iq:time'/>
<feature var='urn:xmpp:http:upload'/>
<feature var='urn:xmpp:ping'/>
<feature var='http://jabber.org/protocol/disco#info'/>
<feature var='http://jabber.org/protocol/disco#items'/>
<feature var='jabber:iq:private'/>
<feature var='jabber:iq:version'/>
<feature var='jabber:iq:last'/>
<x xmlns='jabber:x:data' type='result'>
<field type='hidden' var='FORM_TYPE'>
<value>urn:xmpp:http:upload</value>
</field>
<field type='text-single' var='max-file-size'>
<value>104857600</value>
</field>
</x>
</query>
</iq>
Pidgin reports "HTTP File Upload is not supported by server".
Module built from current source, prosody and mod_http_upload_external from official repo.
Is it possible to build a Windows binary of this plugin?
Regards,
Markus
Smaller files (max 136kb) will be transfered and uploaded successfully.
Larger files (>1.3mb) will be transfered and uploaded successfully (in gui only), serverside the connection closes and nothing is uploaded.
small file, log from prosody server:
Given upload slot "waeFqqVOMmQ8x2Tb/Screenshot from 2017-05-13 15-26-41.png"
File uploaded by USER to slot waeFqqVOMmQ8x2Tb
larger file, log from prosody server:
Given upload slot "lUBqVGUpRJdDKmtB/Screenshot from 2017-04-26 16-38-41.png"
server.lua: client 84.169.148.114:40182 read error: closed
server.lua: closed client handler and removed socket from list
I tried something but i'm unable to debug this issue.
I am using RHEL7.4. Can you please tell me how to install the dependencies mentioned. I am getting "fatal error" message during make file.
Package purple was not found in the pkg-config search path
perhaps you should add the directory containing 'purple.pc' to the PKG_CONFIG_PATH environment variable.
When using pidgin 2.10.12 on ubuntu 16.04 with lurch, uploaded files are not OMEMO encrypted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.