Package: graphite-web
Version: 1.1.8-2
Severity: normal
Tags: patch

Dear Maintainer,

graphite-web in bookworm (1.1.8-2) does not allow saving dashboards due to 
missing function
htmlEncode from dashboard.js. Workaround is to install 1.1.10-1 from testing, 
where
dashboard.js contains the definition of htmlEncode.

As a note to others: js is cached in the browser for quite some time, so the
showing up of the bug was delayed

Please consider the applied patch for bookwoorm which simply adds the missing 
function.

Thanks and greetings
  Hermann

-- System Information:
Debian Release: 12.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 6.5.2 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_WARN, TAINT_TEST
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages graphite-web depends on:
ii  adduser                 3.134
ii  python3                 3.11.2-1+b1
ii  python3-cairo           1.20.1-5+b1
ii  python3-cairocffi       1.4.0-1
ii  python3-django          3:3.2.19-1+deb12u1
ii  python3-django-tagging  1:0.5.0-4
ii  python3-pyparsing       3.0.9-1
ii  python3-simplejson      3.18.3-1
ii  python3-six             1.16.0-4
ii  python3-tz              2022.7.1-4
ii  python3-urllib3         1.26.12-1
ii  python3-whisper         1.1.4-2.2

graphite-web recommends no packages.

Versions of packages graphite-web suggests:
pn  graphite-carbon          <none>
pn  libapache2-mod-wsgi-py3  <none>
pn  python3-ldap             <none>
pn  python3-memcache         <none>
pn  python3-mysqldb          <none>

-- Configuration Files:
/etc/graphite/local_settings.py changed [not included]

-- no debconf information
--- gw/usr/share/graphite-web/static/js/dashboard.js    2023-03-17 
14:24:47.000000000 +0100
+++ gw10/usr/share/graphite-web/static/js/dashboard.js  2023-09-21 
16:39:16.000000000 +0200
@@ -157,6 +157,12 @@
   return false;
 }
 
+function htmlEncode(input) {
+  return input.replace(/[^a-zA-Z0-9 ]/g, function (chr) {
+    return '&#' + chr.charCodeAt() + ';';
+  });
+}
+
 function htmlStriped(input) {
   return htmlEncode(input).replace(/\s/g, '_')
 }

Reply via email to