Package: ejabberd
Version: 16.06-2~bpo8+1.1
Severity: normal
Tags: upstream

Dear Maintainer,

When I enable pubsub module from ejabberd with a non-default database storage,
the configuration modifications on nodes aren't saved correctly.

Indeed, I've configured ejabberd with PostgreSQL as database storage and
pubsub node configuration can't be updated, because of a SQL syntax error in
the ejabberd source code.

Steps to reproduce:

  * Configure pubsub module with "db_type = sql"
  * Restart ejabberd service
  * Update a node configuration using a client (like Gajim 0.16)
  * Open the node configuration to check if the changes were applied

Currently, the configuration doesn't apply and the SQL server reports a
syntax error (PostgreSQL in my case).

The new configuration should be applied on the node configuration
without SQL syntax error.

This bug were first reported to upstream directly, they found its origin
and proposed a patch.

I've modified the debian jessie-backports package to apply the commit
on my server and it works well (that's why the bug report indicates
ejabberd version as 16.06-2~bpo8+1.1 instead of 16.06-2~bpo8+1).

* URL of upstream bug report:
https://github.com/processone/ejabberd/issues/1219
* URL with upstream patch:
https://github.com/processone/ejabberd/commit/a9c6748ec7831ba5e0323186f148edb78ba9aa05

Could you add this patch to the current debian package ?

Regards,
Adrien

-- System Information:
Debian Release: 8.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ejabberd depends on:
ii  adduser                        3.113+nmu3
ii  debconf [debconf-2.0]          1.5.56
ii  erlang-asn1                    1:17.3-dfsg-4
ii  erlang-base [erlang-abi-17.0]  1:17.3-dfsg-4
ii  erlang-crypto                  1:17.3-dfsg-4
ii  erlang-inets                   1:17.3-dfsg-4
ii  erlang-lager                   2.0.3-1
ii  erlang-mnesia                  1:17.3-dfsg-4
ii  erlang-odbc                    1:17.3-dfsg-4
ii  erlang-p1-cache-tab            1.0.3-1~bpo8+1
ii  erlang-p1-iconv                1.0.0-2~bpo8+1
ii  erlang-p1-stringprep           1.0.4-1~bpo8+1
ii  erlang-p1-tls                  1.0.5-1~bpo8+1
ii  erlang-p1-utils                1.0.5-1~bpo8+1
ii  erlang-p1-xml                  1.1.14-1~bpo8+1
ii  erlang-p1-yaml                 1.0.4-1~bpo8+1
ii  erlang-p1-zlib                 1.0.1-2~bpo8+1
ii  erlang-public-key              1:17.3-dfsg-4
ii  erlang-ssl                     1:17.3-dfsg-4
ii  erlang-syntax-tools            1:17.3-dfsg-4
ii  erlang-xmerl                   1:17.3-dfsg-4
ii  init-system-helpers            1.22
ii  openssl                        1.0.1t-1+deb8u2
ii  ucf                            3.0030

ejabberd recommends no packages.

Versions of packages ejabberd suggests:
pn  apparmor                                         <none>
pn  apparmor-utils                                   <none>
pn  ejabberd-contrib                                 <none>
ii  erlang-luerl                                     0.2015.12.10-1~bpo8+1
pn  erlang-p1-mysql                                  <none>
ii  erlang-p1-oauth2                                 0.6.1-1~bpo8+1
ii  erlang-p1-pam                                    1.0.0-3~bpo8+1
ii  erlang-p1-pgsql                                  1.1.0-2~bpo8+1
ii  erlang-p1-sip                                    1.0.6-1~bpo8+1
pn  erlang-p1-sqlite3                                <none>
ii  erlang-p1-stun                                   1.0.5-1~bpo8+1
ii  erlang-p1-xmlrpc                                 1.15.1-2~bpo8+1
ii  erlang-redis-client                              1.0.8-2~bpo8+1
ii  graphicsmagick-imagemagick-compat [imagemagick]  1.3.20-3+deb8u1
ii  libunix-syslog-perl                              1.1-2+b4

-- Configuration Files:
/etc/ejabberd/inetrc [Errno 13] Permission non accordée: u'/etc/ejabberd/inetrc'
/etc/ejabberd/modules.d/README.modules [Errno 13] Permission non accordée: 
u'/etc/ejabberd/modules.d/README.modules'

-- debconf information excluded
Add missing comas in sql statement (#1219)
Fixed by upstream commit a9c6748ec7831ba5e0323186f148edb78ba9aa05
--- a/src/nodetree_tree_sql.erl
+++ b/src/nodetree_tree_sql.erl
@@ -77,9 +77,9 @@
 	    catch
 	    ejabberd_sql:sql_query_t(
               ?SQL("update pubsub_node set"
-                   " host=%(H)s"
-                   " node=%(Node)s"
-                   " parent=%(Parent)s"
+                   " host=%(H)s,"
+                   " node=%(Node)s,"
+                   " parent=%(Parent)s,"
                    " type=%(Type)s "
                    "where nodeid=%(OldNidx)d")),
 	    OldNidx;

Reply via email to