Hello community, here is the log from the commit of package prosody for openSUSE:Factory checked in at 2016-11-10 13:18:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/prosody (Old) and /work/SRC/openSUSE:Factory/.prosody.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "prosody" Changes: -------- New Changes file: --- /dev/null 2016-10-27 01:54:32.792041256 +0200 +++ /work/SRC/openSUSE:Factory/.prosody.new/prosody.changes 2016-11-10 13:18:11.000000000 +0100 @@ -0,0 +1,260 @@ +------------------------------------------------------------------- +Tue Oct 11 15:12:33 UTC 2016 - [email protected] + +- Change license to MIT + +------------------------------------------------------------------- +Thu Sep 15 09:28:56 UTC 2016 - [email protected] + +- Add prosody-upstream-0.9-branch-fixes.patch: + Upstream pushes all fixes for a certain release to its own branch. + See: https://prosody.im/files/branches_explained.png + After some time, mostly when a security bug is found, they do a + new minor release. + The fixes however are often needed to make prosody run smoothly + with its community modules. Thus I monitor them and add the patch + set. It's only fixes no new features. + +------------------------------------------------------------------- +Fri Jun 17 15:09:29 UTC 2016 - [email protected] + +- Remove prosody-rpmlintrc: Not needed since last cleanup + +------------------------------------------------------------------- +Mon May 23 10:52:48 UTC 2016 - [email protected] + +- Add: + * prosody-0.9.10.tar.gz.asc + * prosody.keyring containing Matthew and Zashs keys +- Enable source verification + +------------------------------------------------------------------- +Mon May 23 09:57:24 UTC 2016 - [email protected] + +- Move rcprosody into systemd section until we have proper sysvinit support + +------------------------------------------------------------------- +Fri May 20 14:55:28 UTC 2016 - [email protected] + +- Pass optflags to configure +- Install service file and create directories if needed in one run +- Dont strip debug symbols +- Dont need to verify permissions since we set them +- Create systemd tempfile properly +- Install config files with file glob +- Remove sysvinit stuff +- Cleanup systemd conditionals + +------------------------------------------------------------------- +Tue Apr 26 10:46:53 UTC 2016 - [email protected] + +- Use less rights + +------------------------------------------------------------------- +Thu Feb 11 10:01:32 UTC 2016 - [email protected] + +- Update to 0.9.10 + Security: + * mod_dialback: Adopt key generation algorithm from XEP-0185, to prevent impersonation attacks (CVE-2016-0756) + Fixes and improvements: + * Startup: Open /dev/urandom read-only, to fix a failure to start on some systems + * Networking: Improve handling of the 'select' network backend running out of file descriptors + Minor changes: + * Networking: Increase default internal read size to prevent connections stalling with LuaEvent + * DNS: Discard queries that failed to send due to connection errors + * c2s, s2s: Lower priority of shutdown handler, so that modules such as MUC can always send shutdown notifications to (remote) users + +------------------------------------------------------------------- +Thu Feb 11 09:46:11 UTC 2016 - [email protected] + +- Update to 0.9.9 + Security fixes: + * Fix path traversal vulnerability in mod_http_files (CVE-2016-1231) + * Fix use of weak PRNG in generation of dialback secrets (CVE-2016-1232) + Bugs: + * Improve handling of CNAME records in DNS + * Fix traceback when deleting a user in some configurations (issue #496) + * MUC: restrict_room_creation could prevent users from joining rooms (issue #458) + * MUC: fix occasional dropping of iq stanzas sent privately between occupants + * Fix a potential memory leak in mod_pep + Additions: + * Add http:list() command to telnet to view active HTTP services + * IPv4/v6 address selection code for outgoing s2s + * Add support for importing SCRAM hashes from ejabberd + +------------------------------------------------------------------- +Sat May 2 07:56:00 UTC 2015 - [email protected] + +- fix broken prosody-makefile.patch for correct lib path [bnc#926932] + +------------------------------------------------------------------- +Tue Apr 7 09:46:33 UTC 2015 - [email protected] + +- Clean up spec file +- Update to 0.9.8 + * Ensure only valid UTF-8 is passed to libidn + * Fix traceback caused when DNS server IP is unroutable + * HTTP client: More robust handling of chunked encoding across packet boundaries + * Stanza router: Fix handling of 'error' <iq>'s with multiple children + * c2s: Fix error reply when clients try to bind multiple resources on the same stream + * s2s: Ensure to/from attributes are always present on stream headers, even if empty + * Build scripts: Add –libdir option to ./configure to simplify building on some platforms + * Fix traceback in datamanager when used outside of Prosody + * mod_admin_telnet: Fix potential traceback in server:memory() command + * util.stanza: Don't XML-escape whitespace + * prosodyctl: Fix traceback in 'about' command with LuaRocks 2.2.0 + +------------------------------------------------------------------- +Mon Oct 20 13:22:39 UTC 2014 - [email protected] + +- update version 0.9.6 + * certmanager, net.http: Disable SSLv3 by default + * net.http.parser: Support status code 101 and allow handling + of the received data by plugins + * util.filters: Ignore filters being added twice (fixes issues + on removal, i.e. when some plugins are reloaded/unloaded) + * mod_s2s: Close offending s2s streams missing an 'id' attribute + with a stream error instead of throwing an unhandled error + * Networking API: Add 'ondetach' callback for listener objects, + to prevent leaks when connections have their listener changed + * core.stanza_router: Stricter validation of stanzas + * mod_admin_adhoc: Mark 'accountjids' field as required in 'end + user sessions' command + * mod_admin_adhoc: Add required to field in user deletion form + too + * net.dns: Avoid duplicate cache entries + * util.stanza: Escape newlines and tabs (\r\n\t) when serializing + stanzas. + * util/dataforms: Make sure we iterate over field tags only + * mod_s2s: Capitalize log message + * mod_pubsub: Fix error type of 'forbidden' (change from 'cancel' + to 'auth') + +------------------------------------------------------------------- +Wed Aug 20 17:42:14 UTC 2014 - [email protected] + +- install pid to %%{_piddir}, fix for factory + +------------------------------------------------------------------- +Wed Aug 20 16:12:29 UTC 2014 - [email protected] + +- update version 0.9.4 + * Compression: Disallow compression on unauthenticated streams + * Core: Limit default read size and maximum stanza size + * Core: Enable SASL EXTERNAL by default for component s2s + * S2S: Warn if `s2s_secure_auth` and `s2s_require_encryption` + have been set in conflicting ways + * S2S: Warn if no local network addresses were found, + preventing successful s2s + * MUC: Fix traceback when a non-occupant tried to change an + occupant's role + * MUC: API: Fire an event when temporary rooms are destroyed + after the last person leaves + * Telnet: Fixed traceback when listing users + * Telnet: Apply normalization to JIDs in user management + commands + * HTTP: Fix directory detection in file server on Windows + * Plugins: Fix paths on Windows + * MOTD: Don't strip blank lines from the message provided in + the config + * prosodyctl: Better error reporting when generating + certificates + * Makefile: Improve FreeBSD compatibility + * Multiple fixes to our migration tools, and support for + importing MUCs from ejabberd + +------------------------------------------------------------------- +Fri Feb 28 10:00:42 UTC 2014 - [email protected] + +- fix bnc#865781 + * /var/lib/prosody should be owned by prosody:prosody. + +------------------------------------------------------------------- +Wed Feb 26 12:55:07 UTC 2014 - [email protected] + +- update version 0.9.3 + * A config file passed as command line argument is no longer + forgotten when config is reloaded + * MUC: Allow admins to always bypass restrict_room_creation + * Strip trailing '.' when normalizing hostnames + * HTTP: Prevent silent connection failures + * Components: Alow easier overriding of component authentication + by plugins + * Components: Enable TCP keepalives + * Migrator: Better error reporting and improved robustness + * S2S: Include IP in log messages, if hostname is unavailable + * TLS: Log error when initialization fails + +------------------------------------------------------------------- +Tue Feb 4 07:55:28 UTC 2014 - [email protected] + +- "After" mysql.service, as if it starts before mysql, prosody + can read account infos. + +------------------------------------------------------------------- +Thu Jan 23 09:38:56 UTC 2014 - [email protected] + +- update to 0.8.2 ++++ 63 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:Factory/.prosody.new/prosody.changes New: ---- prosody-0.9.10.tar.gz prosody-0.9.10.tar.gz.asc prosody-cfg.patch prosody-configure.patch prosody-makefile.patch prosody-upstream-0.9-branch-fixes.patch prosody.changes prosody.keyring prosody.service prosody.spec prosody.tmpfile ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ prosody.spec ++++++ # # spec file for package prosody # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?suse_version} > 1230 || 0%{?rhel_version} > 600 || 0%{?centos_version} > 600 || 0%{?fedora_version} >= 20 || 0%{?el7}%{?fc20}%{?fc21}%{?fc22}%{?fc23}%{?fc24}%{?fc25} %bcond_without systemd %define _piddir /run %else %bcond_with systemd %define _piddir %{_localstatedir}/run %endif %{!?_tmpfilesdir: %global _tmpfilesdir /usr/lib/tmpfiles.d } Name: prosody Version: 0.9.10 Release: 0 Summary: Modern flexible communications server for Jabber/XMPP License: MIT Group: Productivity/Networking/Other Url: http://prosody.im/downloads/source Source: http://prosody.im/downloads/source/%{name}-%{version}.tar.gz Source2: http://prosody.im/downloads/source/%{name}-%{version}.tar.gz.asc Source3: %{name}.keyring Source4: %{name}.service Source5: prosody.tmpfile Patch1: prosody-configure.patch Patch2: prosody-makefile.patch # PATCH-FIX-OPENSUSE [email protected] - enable Unix features Patch3: prosody-cfg.patch # PATCH-FIX-UPSTREAM [email protected] - add all the fixes from their branch. See changes file. Patch4: prosody-upstream-0.9-branch-fixes.patch BuildRequires: libidn-devel BuildRequires: libopenssl-devel Requires: lua51-luaexpat Requires: lua51-luafilesystem Requires: lua51-luasec Requires: lua51-luasocket Requires(pre): permissions Requires(pre): pwdutils Recommends: lua51-luadbi Recommends: lua51-luaevent Recommends: lua51-zlib BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} <= 1210 BuildRequires: lua-devel BuildRequires: openssl Requires: lua %else BuildRequires: lua51-devel Requires: lua51 %endif %if %{with systemd} %{?systemd_requires} BuildRequires: systemd %endif %description Prosody is a flexible communications server for Jabber/XMPP written in Lua. It aims to be easy to use, and light on resources. For developers it aims to be easy to extend and give a flexible system on which to rapidly develop added functionality, or prototype new protocols. %prep %setup -q %patch1 %patch2 %patch3 -p1 %patch4 -p1 sed -i 's|@@LIBDIR@@|%{_libdir}|g;s|@@INCLUDEDIR@@|%{_includedir}|g;' configure sed -i 's|@@LIBDIR@@|%{_libdir}|g;s|@@INCLUDEDIR@@|%{_includedir}|g;' Makefile sed -i 's|@@PIDDIR@@|%{_piddir}|g;' prosody.cfg.lua.dist %build # CFLAGS need to keep -fPIC for shared modules ./configure --lua-suffix="" --cflags="%{optflags} -fPIC" --c-compiler=gcc make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %{?_smp_mflags} %if %{with systemd} install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service # tmpfiles.d install -D -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf mkdir -p %{buildroot}%{_sbindir} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcprosody %endif #systemd # mkdir read/write by prosody mkdir -p %{buildroot}%{_piddir}/prosody mkdir -p %{buildroot}%{_localstatedir}/log/prosody # clean up for rpmlint chmod 644 %{buildroot}/%{_libdir}/prosody/prosody.version chmod -R g+rX,o= %{buildroot}%{_sysconfdir}/prosody %pre getent group %{name} > /dev/null || groupadd -r %{name} getent passwd %{name} > /dev/null || useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s/sbin/nologin -c "user for %{name}" %{name} %if %{with systemd} %service_add_pre %{name}.service %post %service_add_post %{name}.service systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf ||: %preun %service_del_preun %{name}.service %postun %service_del_postun %{name}.service %endif %files %defattr(-,root,root) %config %attr(-,root,prosody) %{_sysconfdir}/prosody/ %{_bindir}/prosody %{_bindir}/prosodyctl %dir %{_libdir}/prosody %dir %{_libdir}/prosody/core %{_libdir}/prosody/core/certmanager.lua %{_libdir}/prosody/core/configmanager.lua %{_libdir}/prosody/core/hostmanager.lua %{_libdir}/prosody/core/loggingmanager.lua %{_libdir}/prosody/core/moduleapi.lua %{_libdir}/prosody/core/modulemanager.lua %{_libdir}/prosody/core/portmanager.lua %{_libdir}/prosody/core/rostermanager.lua %{_libdir}/prosody/core/s2smanager.lua %{_libdir}/prosody/core/sessionmanager.lua %{_libdir}/prosody/core/stanza_router.lua %{_libdir}/prosody/core/storagemanager.lua %{_libdir}/prosody/core/usermanager.lua %dir %{_libdir}/prosody/modules %dir %{_libdir}/prosody/modules/adhoc %{_libdir}/prosody/modules/adhoc/adhoc.lib.lua %{_libdir}/prosody/modules/adhoc/mod_adhoc.lua %{_libdir}/prosody/modules/mod_admin_adhoc.lua %{_libdir}/prosody/modules/mod_admin_telnet.lua %{_libdir}/prosody/modules/mod_announce.lua %{_libdir}/prosody/modules/mod_auth_anonymous.lua %{_libdir}/prosody/modules/mod_auth_cyrus.lua %{_libdir}/prosody/modules/mod_auth_internal_hashed.lua %{_libdir}/prosody/modules/mod_auth_internal_plain.lua %{_libdir}/prosody/modules/mod_bosh.lua %{_libdir}/prosody/modules/mod_c2s.lua %{_libdir}/prosody/modules/mod_component.lua %{_libdir}/prosody/modules/mod_compression.lua %{_libdir}/prosody/modules/mod_dialback.lua %{_libdir}/prosody/modules/mod_disco.lua %{_libdir}/prosody/modules/mod_groups.lua %{_libdir}/prosody/modules/mod_http.lua %{_libdir}/prosody/modules/mod_http_errors.lua %{_libdir}/prosody/modules/mod_http_files.lua %{_libdir}/prosody/modules/mod_iq.lua %{_libdir}/prosody/modules/mod_lastactivity.lua %{_libdir}/prosody/modules/mod_legacyauth.lua %{_libdir}/prosody/modules/mod_message.lua %{_libdir}/prosody/modules/mod_motd.lua %{_libdir}/prosody/modules/mod_net_multiplex.lua %{_libdir}/prosody/modules/mod_offline.lua %{_libdir}/prosody/modules/mod_pep.lua %{_libdir}/prosody/modules/mod_ping.lua %{_libdir}/prosody/modules/mod_posix.lua %{_libdir}/prosody/modules/mod_presence.lua %{_libdir}/prosody/modules/mod_privacy.lua %{_libdir}/prosody/modules/mod_private.lua %{_libdir}/prosody/modules/mod_proxy65.lua %{_libdir}/prosody/modules/mod_pubsub.lua %{_libdir}/prosody/modules/mod_register.lua %{_libdir}/prosody/modules/mod_roster.lua %dir %{_libdir}/prosody/modules/mod_s2s %{_libdir}/prosody/modules/mod_s2s/mod_s2s.lua %{_libdir}/prosody/modules/mod_s2s/s2sout.lib.lua %{_libdir}/prosody/modules/mod_saslauth.lua %{_libdir}/prosody/modules/mod_storage_internal.lua %{_libdir}/prosody/modules/mod_storage_none.lua %{_libdir}/prosody/modules/mod_storage_sql.lua %{_libdir}/prosody/modules/mod_time.lua %{_libdir}/prosody/modules/mod_tls.lua %{_libdir}/prosody/modules/mod_uptime.lua %{_libdir}/prosody/modules/mod_vcard.lua %{_libdir}/prosody/modules/mod_version.lua %{_libdir}/prosody/modules/mod_watchregistrations.lua %{_libdir}/prosody/modules/mod_welcome.lua %dir %{_libdir}/prosody/modules/muc %{_libdir}/prosody/modules/muc/mod_muc.lua %{_libdir}/prosody/modules/muc/muc.lib.lua %{_libdir}/prosody/modules/sql.lib.lua %dir %{_libdir}/prosody/modules/storage %{_libdir}/prosody/modules/storage/mod_xep0227.lua %{_libdir}/prosody/modules/storage/sqlbasic.lib.lua %{_libdir}/prosody/modules/storage/xep227store.lib.lua %dir %{_libdir}/prosody/net %{_libdir}/prosody/net/adns.lua %{_libdir}/prosody/net/connlisteners.lua %{_libdir}/prosody/net/dns.lua %dir %{_libdir}/prosody/net/http %{_libdir}/prosody/net/http/codes.lua %{_libdir}/prosody/net/http/parser.lua %{_libdir}/prosody/net/http/server.lua %{_libdir}/prosody/net/http.lua %{_libdir}/prosody/net/httpserver.lua %{_libdir}/prosody/net/server_event.lua %{_libdir}/prosody/net/server.lua %{_libdir}/prosody/net/server_select.lua %{_libdir}/prosody/prosody.version %dir %{_libdir}/prosody/util %{_libdir}/prosody/util/adhoc.lua %{_libdir}/prosody/util/array.lua %{_libdir}/prosody/util/caps.lua %{_libdir}/prosody/util/dataforms.lua %{_libdir}/prosody/util/datamanager.lua %{_libdir}/prosody/util/datetime.lua %{_libdir}/prosody/util/debug.lua %{_libdir}/prosody/util/dependencies.lua %{_libdir}/prosody/util/encodings.so %{_libdir}/prosody/util/envload.lua %{_libdir}/prosody/util/events.lua %{_libdir}/prosody/util/filters.lua %{_libdir}/prosody/util/hashes.so %{_libdir}/prosody/util/helpers.lua %{_libdir}/prosody/util/hmac.lua %{_libdir}/prosody/util/http.lua %{_libdir}/prosody/util/import.lua %{_libdir}/prosody/util/ip.lua %{_libdir}/prosody/util/iterators.lua %{_libdir}/prosody/util/jid.lua %{_libdir}/prosody/util/json.lua %{_libdir}/prosody/util/logger.lua %{_libdir}/prosody/util/multitable.lua %{_libdir}/prosody/util/net.so %{_libdir}/prosody/util/openssl.lua %{_libdir}/prosody/util/pluginloader.lua %{_libdir}/prosody/util/pposix.so %{_libdir}/prosody/util/prosodyctl.lua %{_libdir}/prosody/util/pubsub.lua %{_libdir}/prosody/util/rfc6724.lua %dir %{_libdir}/prosody/util/sasl %{_libdir}/prosody/util/sasl/anonymous.lua %{_libdir}/prosody/util/sasl_cyrus.lua %{_libdir}/prosody/util/sasl/digest-md5.lua %{_libdir}/prosody/util/sasl.lua %{_libdir}/prosody/util/sasl/plain.lua %{_libdir}/prosody/util/sasl/scram.lua %{_libdir}/prosody/util/serialization.lua %{_libdir}/prosody/util/set.lua %{_libdir}/prosody/util/signal.so %{_libdir}/prosody/util/sql.lua %{_libdir}/prosody/util/stanza.lua %{_libdir}/prosody/util/template.lua %{_libdir}/prosody/util/termcolours.lua %{_libdir}/prosody/util/throttle.lua %{_libdir}/prosody/util/timer.lua %{_libdir}/prosody/util/uuid.lua %{_libdir}/prosody/util/watchdog.lua %{_libdir}/prosody/util/x509.lua %{_libdir}/prosody/util/xml.lua %{_libdir}/prosody/util/xmppstream.lua %{_mandir}/man1/prosodyctl.1* %dir %attr(-,prosody,prosody) %{_localstatedir}/lib/prosody %dir %attr(-,prosody,prosody) %{_localstatedir}/log/prosody %if %{with systemd} %{_sbindir}/rcprosody %{_unitdir}/%{name}.service %{_tmpfilesdir}/%{name}.conf %dir %attr(0755,prosody,prosody) %ghost %{_piddir}/prosody %else %dir %attr(0755,prosody,prosody) %{_piddir}/prosody %endif # systemd %changelog ++++++ prosody-cfg.patch ++++++ Index: prosody-0.9.2/prosody.cfg.lua.dist =================================================================== --- prosody-0.9.2.orig/prosody.cfg.lua.dist +++ prosody-0.9.2/prosody.cfg.lua.dist @@ -63,7 +63,7 @@ modules_enabled = { --"http_files"; -- Serve static files from a directory over HTTP -- Other specific functionality - --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. + "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. --"groups"; -- Shared roster support --"announce"; -- Send announcement to all online users --"welcome"; -- Welcome users who register accounts @@ -80,6 +80,9 @@ modules_disabled = { -- "s2s"; -- Handle server-to-server connections }; +-- Unix specific +pidfile = "@@PIDDIR@@/prosody/prosody.pid" + -- Disable account creation by default, for security -- For more information see http://prosody.im/doc/creating_accounts allow_registration = false; @@ -139,8 +142,8 @@ authentication = "internal_plain" -- Logging configuration -- For advanced logging see http://prosody.im/doc/logging log = { - info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging - error = "prosody.err"; + info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging + error = "/var/log/prosody/prosody.err"; -- "*syslog"; -- Uncomment this for logging to syslog -- "*console"; -- Log to the console, useful for debugging with daemonize=false } ++++++ prosody-configure.patch ++++++ --- configure 2015-03-24 20:18:04.000000000 +0100 +++ configure 2015-04-07 11:17:38.445610977 +0200 @@ -2,15 +2,15 @@ # Defaults -PREFIX=/usr/local -SYSCONFDIR="$PREFIX/etc/prosody" -LIBDIR="$PREFIX/lib" -DATADIR="$PREFIX/var/lib/prosody" +PREFIX=/usr +SYSCONFDIR="/etc/prosody" +LIBDIR="/lib" +DATADIR="/var/lib/prosody" LUA_SUFFIX="" LUA_DIR="/usr" LUA_BINDIR="/usr/bin" -LUA_INCDIR="/usr/include" -LUA_LIBDIR="/usr/lib" +LUA_INCDIR="@@INCLUDEDIR@@" +LUA_LIBDIR="@@LIBDIR@@" IDN_LIB=idn ICU_FLAGS="-licui18n -licudata -licuuc" OPENSSL_LIB=crypto ++++++ prosody-makefile.patch ++++++ --- Makefile 2015-03-24 20:18:04.000000000 +0100 +++ Makefile 2015-04-07 11:30:05.602236338 +0200 @@ -3,14 +3,14 @@ BIN = $(DESTDIR)$(PREFIX)/bin CONFIG = $(DESTDIR)$(SYSCONFDIR) -MODULES = $(DESTDIR)$(LIBDIR)/prosody/modules -SOURCE = $(DESTDIR)$(LIBDIR)/prosody +MODULES = $(DESTDIR)@@LIBDIR@@/prosody/modules +SOURCE = $(DESTDIR)@@LIBDIR@@/prosody DATA = $(DESTDIR)$(DATADIR) MAN = $(DESTDIR)$(PREFIX)/share/man -INSTALLEDSOURCE = $(LIBDIR)/prosody +INSTALLEDSOURCE = @@LIBDIR@@/prosody INSTALLEDCONFIG = $(SYSCONFDIR) -INSTALLEDMODULES = $(LIBDIR)/prosody/modules +INSTALLEDMODULES = @@LIBDIR@@/prosody/modules INSTALLEDDATA = $(DATADIR) .PHONY: all clean install ++++++ prosody-upstream-0.9-branch-fixes.patch ++++++ # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1456436202 -3600 # Thu Feb 25 22:36:42 2016 +0100 # Node ID 67ac4a0b6e50012d0a4a33d3968503e0d33957e9 # Parent 01bd0ac9cf0c544a95eb8999968ae36159f66122 util.datamanager: Unreference file handle after closing it to prevent trying to close it again (fixes #632) diff -r 01bd0ac9cf0c -r 67ac4a0b6e50 util/datamanager.lua --- a/util/datamanager.lua Wed Jan 27 13:05:58 2016 +0000 +++ b/util/datamanager.lua Thu Feb 25 22:36:42 2016 +0100 @@ -152,6 +152,7 @@ if not ok then break end ok, msg = f:close(); + f = nil; -- no longer valid if not ok then break end return os_rename(scratch, filename); # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1456932491 -3600 # Wed Mar 02 16:28:11 2016 +0100 # Node ID 56e65b1e54e8683c7b3169ecfd5ee1171ed25aa1 # Parent 67ac4a0b6e50012d0a4a33d3968503e0d33957e9 mod_c2s: Remove connection object from session object when connection disconnected to prevent accidental use (see #590) diff -r 67ac4a0b6e50 -r 56e65b1e54e8 plugins/mod_c2s.lua --- a/plugins/mod_c2s.lua Thu Feb 25 22:36:42 2016 +0100 +++ b/plugins/mod_c2s.lua Wed Mar 02 16:28:11 2016 +0100 @@ -258,6 +258,7 @@ if session then (session.log or log)("info", "Client disconnected: %s", err or "connection closed"); sm_destroy_session(session, err); + session.conn = nil; sessions[conn] = nil; end end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1456932605 -3600 # Wed Mar 02 16:30:05 2016 +0100 # Node ID 168d03dd09c756e66b359d68d0aec1e2eb2bca2e # Parent 56e65b1e54e8683c7b3169ecfd5ee1171ed25aa1 net.server_event: Prevent resuming connections without readcallback, eg closed connections (fixes #590) diff -r 56e65b1e54e8 -r 168d03dd09c7 net/server_event.lua --- a/net/server_event.lua Wed Mar 02 16:28:11 2016 +0100 +++ b/net/server_event.lua Wed Mar 02 16:30:05 2016 +0100 @@ -289,7 +289,7 @@ function interface_mt:resume() self:_lock(self.nointerface, false, self.nowriting); - if not self.eventread then + if self.readcallback and not self.eventread then self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ); -- register callback end end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1456932646 -3600 # Wed Mar 02 16:30:46 2016 +0100 # Node ID f911f929ca6c8efa13b000eeec5f636d309e001b # Parent 168d03dd09c756e66b359d68d0aec1e2eb2bca2e net.server_event: Return true from conn:resume() to indicate success diff -r 168d03dd09c7 -r f911f929ca6c net/server_event.lua --- a/net/server_event.lua Wed Mar 02 16:30:05 2016 +0100 +++ b/net/server_event.lua Wed Mar 02 16:30:46 2016 +0100 @@ -291,6 +291,7 @@ self:_lock(self.nointerface, false, self.nowriting); if self.readcallback and not self.eventread then self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ); -- register callback + return true; end end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1457015287 -3600 # Thu Mar 03 15:28:07 2016 +0100 # Node ID b5b7ae2901e64183e7393ee36933c862ba76b2bd # Parent f911f929ca6c8efa13b000eeec5f636d309e001b mod_http_files: Fix traceback when serving a non-wildcard path (fixes #611) diff -r f911f929ca6c -r b5b7ae2901e6 plugins/mod_http_files.lua --- a/plugins/mod_http_files.lua Wed Mar 02 16:30:46 2016 +0100 +++ b/plugins/mod_http_files.lua Thu Mar 03 15:28:07 2016 +0100 @@ -56,6 +56,7 @@ local urldecode = require "util.http".urldecode; function sanitize_path(path) + if not path then return end local out = {}; local c = 0; @@ -88,10 +89,11 @@ local directory_index = opts.directory_index; local function serve_file(event, path) local request, response = event.request, event.response; - path = sanitize_path(path); - if not path then + local sanitized_path = sanitize_path(path); + if path and not sanitized_path then return 400; end + path = sanitized_path; local orig_path = sanitize_path(request.path); local full_path = base_path .. (path and "/"..path or ""):gsub("/", path_sep); local attr = stat(full_path:match("^.*[^\\/]")); -- Strip trailing path separator because Windows # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1457015400 -3600 # Thu Mar 03 15:30:00 2016 +0100 # Node ID dcc8ed11173c15fc854ea9c33a794212b1298748 # Parent b5b7ae2901e64183e7393ee36933c862ba76b2bd mod_http_files: Don't prepend / to path twice, sanitize path does this already diff -r b5b7ae2901e6 -r dcc8ed11173c plugins/mod_http_files.lua --- a/plugins/mod_http_files.lua Thu Mar 03 15:28:07 2016 +0100 +++ b/plugins/mod_http_files.lua Thu Mar 03 15:30:00 2016 +0100 @@ -95,7 +95,7 @@ end path = sanitized_path; local orig_path = sanitize_path(request.path); - local full_path = base_path .. (path and "/"..path or ""):gsub("/", path_sep); + local full_path = base_path .. (path or ""):gsub("/", path_sep); local attr = stat(full_path:match("^.*[^\\/]")); -- Strip trailing path separator because Windows if not attr then return 404; # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1457015506 -3600 # Thu Mar 03 15:31:46 2016 +0100 # Node ID 20246b1396071e821bf41810ce2d0a016c48f4af # Parent dcc8ed11173c15fc854ea9c33a794212b1298748 mod_http_files: Preserve a trailing / in paths (fixes #639) diff -r dcc8ed11173c -r 20246b139607 plugins/mod_http_files.lua --- a/plugins/mod_http_files.lua Thu Mar 03 15:30:00 2016 +0100 +++ b/plugins/mod_http_files.lua Thu Mar 03 15:31:46 2016 +0100 @@ -75,6 +75,9 @@ out[c] = component; end end + if path:sub(-1,-1) == "/" then + out[c+1] = ""; + end return "/"..table.concat(out, "/"); end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1459689501 -7200 # Sun Apr 03 15:18:21 2016 +0200 # Node ID de76ded98b842f92bf7aef0c68aee18b293073d3 # Parent 20246b1396071e821bf41810ce2d0a016c48f4af mod_c2s: Just destroy the session when it has no connection (see #641) diff -r 20246b139607 -r de76ded98b84 plugins/mod_c2s.lua --- a/plugins/mod_c2s.lua Thu Mar 03 15:31:46 2016 +0100 +++ b/plugins/mod_c2s.lua Sun Apr 03 15:18:21 2016 +0200 @@ -175,6 +175,9 @@ sm_destroy_session(session, reason); conn:close(); end + else + local reason = (reason and (reason.name or reason.text or reason.condition)) or reason; + sm_destroy_session(session, reason); end end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1461079239 -7200 # Tue Apr 19 17:20:39 2016 +0200 # Node ID 69827ee1f951e844f02b892f34639a17f5b97d08 # Parent de76ded98b842f92bf7aef0c68aee18b293073d3 MUC: Accept missing form as "instant room" request (fixes #377) diff -r de76ded98b84 -r 69827ee1f951 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sun Apr 03 15:18:21 2016 +0200 +++ b/plugins/muc/muc.lib.lua Tue Apr 19 17:20:39 2016 +0200 @@ -668,6 +668,14 @@ if form.attr.type == "cancel" then origin.send(st.reply(stanza)); return; end if form.attr.type ~= "submit" then origin.send(st.error_reply(stanza, "cancel", "bad-request", "Not a submitted form")); return; end + if form.tags[1] == nil then + -- instant room + if self.save then self:save(true); end + origin.send(st.reply(stanza)); + return true; + end + + local fields = self:get_form_layout():data(form); if fields.FORM_TYPE ~= "http://jabber.org/protocol/muc#roomconfig" then origin.send(st.error_reply(stanza, "cancel", "bad-request", "Form is not of type room configuration")); return; end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1461079440 -7200 # Tue Apr 19 17:24:00 2016 +0200 # Node ID 65abd9d7bf8836058069eded89a5be46dc7a8419 # Parent 69827ee1f951e844f02b892f34639a17f5b97d08 net.server_event: Re-add write event if writebuffer is non-empty after write (eg due to writes from ondrain callback) (fixes #661) diff -r 69827ee1f951 -r 65abd9d7bf88 net/server_event.lua --- a/net/server_event.lua Tue Apr 19 17:20:39 2016 +0200 +++ b/net/server_event.lua Tue Apr 19 17:24:00 2016 +0200 @@ -548,6 +548,10 @@ elseif interface.eventreadtimeout then return EV_WRITE, EV_TIMEOUT end + if interface.writebuffer ~= 0 then + -- data possibly written from ondrain + return EV_WRITE, cfg.WRITE_TIMEOUT + end interface.eventwrite = nil return -1 elseif byte and (err == "timeout" or err == "wantwrite") then -- want write again # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1461082737 -7200 # Tue Apr 19 18:18:57 2016 +0200 # Node ID c774622ad9db7cf15d2328987bef5df8d1e16d2e # Parent 65abd9d7bf8836058069eded89a5be46dc7a8419 net.server_event: Fix traceback if event re-added during starttls diff -r 65abd9d7bf88 -r c774622ad9db net/server_event.lua --- a/net/server_event.lua Tue Apr 19 17:24:00 2016 +0200 +++ b/net/server_event.lua Tue Apr 19 18:18:57 2016 +0200 @@ -545,13 +545,12 @@ elseif interface.startsslcallback then -- start ssl connection if needed debug "starting ssl handshake after writing" interface.eventstarthandshake = addevent( base, nil, EV_TIMEOUT, interface.startsslcallback, 0 ) + elseif interface.writebuffer ~= 0 then + -- data possibly written from ondrain + return EV_WRITE, cfg.WRITE_TIMEOUT elseif interface.eventreadtimeout then return EV_WRITE, EV_TIMEOUT end - if interface.writebuffer ~= 0 then - -- data possibly written from ondrain - return EV_WRITE, cfg.WRITE_TIMEOUT - end interface.eventwrite = nil return -1 elseif byte and (err == "timeout" or err == "wantwrite") then -- want write again # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1461082839 -7200 # Tue Apr 19 18:20:39 2016 +0200 # Node ID 1909bde0e79f8993126035f4ed7b994618bb982e # Parent c774622ad9db7cf15d2328987bef5df8d1e16d2e net.server_event: Return the correct value as timeout diff -r c774622ad9db -r 1909bde0e79f net/server_event.lua --- a/net/server_event.lua Tue Apr 19 18:18:57 2016 +0200 +++ b/net/server_event.lua Tue Apr 19 18:20:39 2016 +0200 @@ -549,7 +549,7 @@ -- data possibly written from ondrain return EV_WRITE, cfg.WRITE_TIMEOUT elseif interface.eventreadtimeout then - return EV_WRITE, EV_TIMEOUT + return EV_WRITE, cfg.WRITE_TIMEOUT end interface.eventwrite = nil return -1 # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1461085110 -7200 # Tue Apr 19 18:58:30 2016 +0200 # Node ID 206f9b0485ad40abc0861f8ef194bcd6585b2b2a # Parent 1909bde0e79f8993126035f4ed7b994618bb982e net.server_event: Check the buffer *length*, not the buffer itself (Fixes 100% cpu usage introduced in 65abd9d7bf88) diff -r 1909bde0e79f -r 206f9b0485ad net/server_event.lua --- a/net/server_event.lua Tue Apr 19 18:20:39 2016 +0200 +++ b/net/server_event.lua Tue Apr 19 18:58:30 2016 +0200 @@ -545,7 +545,7 @@ elseif interface.startsslcallback then -- start ssl connection if needed debug "starting ssl handshake after writing" interface.eventstarthandshake = addevent( base, nil, EV_TIMEOUT, interface.startsslcallback, 0 ) - elseif interface.writebuffer ~= 0 then + elseif interface.writebufferlen ~= 0 then -- data possibly written from ondrain return EV_WRITE, cfg.WRITE_TIMEOUT elseif interface.eventreadtimeout then # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1463850603 -7200 # Sat May 21 19:10:03 2016 +0200 # Node ID ad0b15f253ee092a348b1d3725e7193826a3d5be # Parent 206f9b0485ad40abc0861f8ef194bcd6585b2b2a mod_presence: Re-probe for contacts presence after outgoing 'subscribed' (fixes #673) diff -r 206f9b0485ad -r ad0b15f253ee plugins/mod_presence.lua --- a/plugins/mod_presence.lua Tue Apr 19 18:58:30 2016 +0200 +++ b/plugins/mod_presence.lua Sat May 21 19:10:03 2016 +0200 @@ -201,6 +201,7 @@ end core_post_stanza(origin, stanza); send_presence_of_available_resources(node, host, to_bare, origin); + core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare })); elseif stanza.attr.type == "unsubscribed" then -- 1. send unavailable -- 2. route stanza # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1466626949 -7200 # Wed Jun 22 22:22:29 2016 +0200 # Node ID 94af49ad657e3f08437c8c315aadef6f74bbdd93 # Parent ad0b15f253ee092a348b1d3725e7193826a3d5be mod_privacy: Fix selecting the top resource (fixes #694) diff -r ad0b15f253ee -r 94af49ad657e plugins/mod_privacy.lua --- a/plugins/mod_privacy.lua Sat May 21 19:10:03 2016 +0200 +++ b/plugins/mod_privacy.lua Wed Jun 22 22:22:29 2016 +0200 @@ -397,7 +397,7 @@ local prio = 0; if bare_sessions[node.."@"..host] ~= nil then for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do - if session_.priority ~= nil and session_.priority > prio then + if session_.priority ~= nil and session_.priority >= prio then session = session_; prio = session_.priority; end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1442870388 -7200 # Mon Sep 21 23:19:48 2015 +0200 # Node ID caee8a32983aa2f6a468495f008b7c83e6791729 # Parent 94af49ad657e3f08437c8c315aadef6f74bbdd93 sessionmanager: Make session.send() return true unless there really is an error [backported from 0.10] diff -r 94af49ad657e -r caee8a32983a core/sessionmanager.lua --- a/core/sessionmanager.lua Wed Jun 22 22:22:29 2016 +0200 +++ b/core/sessionmanager.lua Mon Sep 21 23:19:48 2015 +0200 @@ -37,9 +37,15 @@ if t then t = filter("bytes/out", tostring(t)); if t then - return w(conn, t); + local ret, err = w(conn, t); + if not ret then + session.log("debug", "Write-error: %s", tostring(err)); + return false; + end + return true; end end + return true; end session.ip = conn:ip(); local conn_name = "c2s"..tostring(session):match("[a-f0-9]+$"); # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1471112348 -7200 # Sat Aug 13 20:19:08 2016 +0200 # Node ID 3ae247af68f42a83fc5082f7789c7b78a9a2f045 # Parent caee8a32983aa2f6a468495f008b7c83e6791729 net.http.parser: Buffer into a table to reduce GC pressure, collapse to string when needed (fixes #603) diff -r caee8a32983a -r 3ae247af68f4 net/http/parser.lua --- a/net/http/parser.lua Mon Sep 21 23:19:48 2015 +0200 +++ b/net/http/parser.lua Sat Aug 13 20:19:08 2016 +0200 @@ -1,5 +1,6 @@ local tonumber = tonumber; local assert = assert; +local t_insert, t_concat = table.insert, table.concat; local url_parse = require "socket.url".parse; local urldecode = require "util.http".urldecode; @@ -27,7 +28,7 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb) local client = true; if not parser_type or parser_type == "server" then client = false; else assert(parser_type == "client", "Invalid parser type"); end - local buf = ""; + local buf, buflen, buftable = {}, 0, true; local chunked, chunk_size, chunk_start; local state = nil; local packet; @@ -38,6 +39,7 @@ feed = function(self, data) if error then return nil, "parse has failed"; end if not data then -- EOF + if buftable then buf, buftable = t_concat(buf), false; end if state and client and not len then -- reading client body until EOF packet.body = buf; success_cb(packet); @@ -46,9 +48,16 @@ end return; end - buf = buf..data; - while #buf > 0 do + if buftable then + t_insert(buf, data); + else + buf = { buf, data }; + buftable = true; + end + buflen = buflen + #data; + while buflen > 0 do if state == nil then -- read request + if buftable then buf, buftable = t_concat(buf), false; end local index = buf:find("\r\n\r\n", nil, true); if not index then return; end -- not enough data local method, path, httpversion, status_code, reason_phrase; @@ -115,11 +124,13 @@ }; end buf = buf:sub(index + 4); + buflen = #buf; state = true; end if state then -- read body if client then if chunked then + if buftable then buf, buftable = t_concat(buf), false; end if not buf:find("\r\n", nil, true) then return; end -- not enough data @@ -132,25 +143,29 @@ state, chunk_size = nil, nil; buf = buf:gsub("^.-\r\n\r\n", ""); -- This ensure extensions and trailers are stripped success_cb(packet); - elseif #buf - chunk_start - 2 >= chunk_size then -- we have a chunk + elseif buflen - chunk_start - 2 >= chunk_size then -- we have a chunk packet.body = packet.body..buf:sub(chunk_start, chunk_start + (chunk_size-1)); buf = buf:sub(chunk_start + chunk_size + 2); chunk_size, chunk_start = nil, nil; else -- Partial chunk remaining break; end - elseif len and #buf >= len then + elseif len and buflen >= len then + if buftable then buf, buftable = t_concat(buf), false; end if packet.code == 101 then - packet.body, buf = buf, ""; + packet.body, buf, buflen, buftable = buf, {}, 0, true; else packet.body, buf = buf:sub(1, len), buf:sub(len + 1); + buflen = #buf; end state = nil; success_cb(packet); else break; end - elseif #buf >= len then + elseif buflen >= len then + if buftable then buf, buftable = t_concat(buf), false; end packet.body, buf = buf:sub(1, len), buf:sub(len + 1); + buflen = #buf; state = nil; success_cb(packet); else break; # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1471524478 -7200 # Thu Aug 18 14:47:58 2016 +0200 # Node ID d3646443a02ec7dc8f0d62bb7477b5922157563d # Parent 3ae247af68f42a83fc5082f7789c7b78a9a2f045 net.http.parser: Add a limit on content length, default to 10M diff -r 3ae247af68f4 -r d3646443a02e net/http/parser.lua --- a/net/http/parser.lua Sat Aug 13 20:19:08 2016 +0200 +++ b/net/http/parser.lua Thu Aug 18 14:47:58 2016 +0200 @@ -29,6 +29,7 @@ local client = true; if not parser_type or parser_type == "server" then client = false; else assert(parser_type == "client", "Invalid parser type"); end local buf, buflen, buftable = {}, 0, true; + local bodylimit = 10*1024*1024; local chunked, chunk_size, chunk_start; local state = nil; local packet; @@ -88,6 +89,7 @@ if not first_line then error = true; return error_cb("invalid-status-line"); end chunked = have_body and headers["transfer-encoding"] == "chunked"; len = tonumber(headers["content-length"]); -- TODO check for invalid len + if len and len > bodylimit then error = true; return error_cb("content-length-limit-exceeded"); end if client then -- FIXME handle '100 Continue' response (by skipping it) if not have_body then len = 0; end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1471524522 -7200 # Thu Aug 18 14:48:42 2016 +0200 # Node ID 3dc52f1778db8c324a9104010721fd05e69e880e # Parent d3646443a02ec7dc8f0d62bb7477b5922157563d net.http.parser: Add a limit on maximum buffer size, default to 20M diff -r d3646443a02e -r 3dc52f1778db net/http/parser.lua --- a/net/http/parser.lua Thu Aug 18 14:47:58 2016 +0200 +++ b/net/http/parser.lua Thu Aug 18 14:48:42 2016 +0200 @@ -30,6 +30,7 @@ if not parser_type or parser_type == "server" then client = false; else assert(parser_type == "client", "Invalid parser type"); end local buf, buflen, buftable = {}, 0, true; local bodylimit = 10*1024*1024; + local buflimit = bodylimit * 2; local chunked, chunk_size, chunk_start; local state = nil; local packet; @@ -56,6 +57,7 @@ buftable = true; end buflen = buflen + #data; + if buflen > buflimit then error = true; return error_cb("max-buffer-size-exceeded"); end while buflen > 0 do if state == nil then -- read request if buftable then buf, buftable = t_concat(buf), false; end # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1471524606 -7200 # Thu Aug 18 14:50:06 2016 +0200 # Node ID 65bf55fdf971bb8bf634ba4989ab762be36fba14 # Parent 3dc52f1778db8c324a9104010721fd05e69e880e net.http.parser: Allow limits to be configurable via options callback diff -r 3dc52f1778db -r 65bf55fdf971 net/http/parser.lua --- a/net/http/parser.lua Thu Aug 18 14:48:42 2016 +0200 +++ b/net/http/parser.lua Thu Aug 18 14:50:06 2016 +0200 @@ -29,8 +29,8 @@ local client = true; if not parser_type or parser_type == "server" then client = false; else assert(parser_type == "client", "Invalid parser type"); end local buf, buflen, buftable = {}, 0, true; - local bodylimit = 10*1024*1024; - local buflimit = bodylimit * 2; + local bodylimit = tonumber(options_cb and options_cb().body_size_limit) or 10*1024*1024; + local buflimit = tonumber(options_cb and options_cb().buffer_size_limit) or bodylimit * 2; local chunked, chunk_size, chunk_start; local state = nil; local packet; # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1471524639 -7200 # Thu Aug 18 14:50:39 2016 +0200 # Node ID d430573fe9f87ceca5ac00943f08c873c042548d # Parent 65bf55fdf971bb8bf634ba4989ab762be36fba14 net.http.server: Expose way to set http server options diff -r 65bf55fdf971 -r d430573fe9f8 net/http/server.lua --- a/net/http/server.lua Thu Aug 18 14:50:06 2016 +0200 +++ b/net/http/server.lua Thu Aug 18 14:50:39 2016 +0200 @@ -19,6 +19,7 @@ local listener = {}; local hosts = {}; local default_host; +local options = {}; local function is_wildcard_event(event) return event:sub(-2, -1) == "/*"; @@ -130,7 +131,10 @@ sessions[conn] = nil; conn:close(); end - sessions[conn] = parser_new(success_cb, error_cb); + local function options_cb() + return options; + end + sessions[conn] = parser_new(success_cb, error_cb, "server", options_cb); end function listener.ondisconnect(conn) @@ -300,6 +304,9 @@ function _M.fire_event(event, ...) return events.fire_event(event, ...); end +function _M.set_option(name, value) + options[name] = value; +end _M.listener = listener; _M.codes = codes; # HG changeset patch # User Kim Alvefur <[email protected]> # Date 1471524671 -7200 # Thu Aug 18 14:51:11 2016 +0200 # Node ID 588ed6451984276c4d03435a6af278bf910b1fd8 # Parent d430573fe9f87ceca5ac00943f08c873c042548d mod_http: Allow configuring http parser size limits diff -r d430573fe9f8 -r 588ed6451984 plugins/mod_http.lua --- a/plugins/mod_http.lua Thu Aug 18 14:50:39 2016 +0200 +++ b/plugins/mod_http.lua Thu Aug 18 14:51:11 2016 +0200 @@ -18,6 +18,9 @@ server.set_default_host(module:get_option_string("http_default_host")); +server.set_option("body_size_limit", module:get_option_number("http_max_content_size")); +server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size")); + local function normalize_path(path) if path:sub(-1,-1) == "/" then path = path:sub(1, -2); end if path:sub(1,1) ~= "/" then path = "/"..path; end ++++++ prosody.service ++++++ [Unit] Description=Jabber/XMPP Server After=network-online.target mysql.service [Service] Type=forking PIDFile=/run/prosody/prosody.pid ExecStart=/usr/bin/prosodyctl start ExecStop=/usr/bin/prosodyctl stop [Install] WantedBy=multi-user.target Alias=org.prosody.service ++++++ prosody.tmpfile ++++++ # prosody needs some files in /run: d /run/prosody 0755 prosody prosody -
