Bug#975736: siege crashes when one of the URLs in a file contains a trailing dollar sign

2020-11-25 Thread Sven Paulus
Package: siege
Version: 4.0.7-1
Severity: normal
Tags: upstream

Dear Maintainer,

siege 4.0.7 crashes when called with a file where at least one of the URLs
contains a trailing dollar sign ($).

How to reproduce?

| $ cat a
| https://www.example.com/$
| $ siege -f a
| Segmentation fault

Regards,

Sven

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (650, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.9.0-1-amd64 (SMP w/12 CPU threads)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages siege depends on:
ii  libc6  2.31-4
ii  libssl1.1  1.1.1h-1
ii  zlib1g 1:1.2.11.dfsg-2

siege recommends no packages.

siege suggests no packages.

-- debconf-show failed



Bug#921840: metar: Parsing metar record fails due to changes in NOAA API

2019-02-09 Thread Sven Paulus
Package: metar
Version: 20061030.1-2.2+b1
Severity: important
Tags: patch

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

* What led up to the situation?

On February 4th the "metar" tool stopped working.
At this point NOAA switched responding on their HTTP URL with metar data
to returning a redirect to the HTTPS variante of the URL.

This can be seen when stracing the command:

sendto(3, "GET /data/observations/metar/stations/EDDH.TXT HTTP/1.1\r\nHost: 
tgftp.nws.noaa.gov\r\nAccept: */*\r\n\r\n", 98, MSG_NOSIGNAL, NULL, 0) = 98
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 103)   = 1 ([{fd=3, revents=POLLIN}])
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 1 ([{fd=3, 
revents=POLLIN|POLLRDNORM}])
recvfrom(3, "HTTP/1.1 302 Object Moved\r\nLocation: 
https://tgftp.nws.noaa.gov/data/observations/metar/stations/EDDH.TXT\r\nContent-Type:
 text/html\r\nCache-Control: private\r\nConnection: close\r\n\r\n 
This object may be found https://tgftp.nws.noaa.gov/data/observations/metar/stations/EDDH.TXT\;>here
 ", 16384, 0, NULL, NULL) = 310

The resulting output is currently - independent of the given ICAO code:

$ metar KJFK
METAR pattern not found in NOAA data.

Since metar is already using the HTTPS capable curl library, a fix is
easy:

--- src/metar.h.orig2019-02-09 11:42:21.266330785 +0100
+++ src/metar.h 2019-02-09 11:39:30.051454153 +0100
@@ -24,7 +24,7 @@
 #define  METAR_MAXSIZE 512

 /* where to fetch reports */
-#define  METARURL "http://tgftp.nws.noaa.gov/data/observations/metar/stations;
+#define  METARURL "https://tgftp.nws.noaa.gov/data/observations/metar/stations;

 /* clouds */
 typedef struct {

Or - for the debian package - by patching the patch:

--- debian/patches/fix-metarurl.orig2019-02-09 11:44:46.832712464 +0100
+++ debian/patches/fix-metarurl 2019-02-09 11:44:59.796579902 +0100
@@ -18,7 +18,7 @@

  /* where to fetch reports */
 -#define  METARURL 
"http://weather.noaa.gov/pub/data/observations/metar/stations;
-+#define  METARURL "http://tgftp.nws.noaa.gov/data/observations/metar/stations;
++#define  METARURL 
"https://tgftp.nws.noaa.gov/data/observations/metar/stations;

  /* clouds */
  typedef struct {

In debian/control the library dependencies have to be upgraded (at least
for Debian testing):

--- debian/control.orig 2019-02-09 11:47:43.335228481 +0100
+++ debian/control  2019-02-09 11:47:55.223124936 +0100
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Kees Leune 
 Standards-Version: 3.9.8
-Build-Depends: libcurl3-gnutls-dev, dh-autoreconf, debhelper (>= 9)
+Build-Depends: libcurl4-openssl-dev, dh-autoreconf, debhelper (>= 9)

 Package: metar
 Architecture: any


Regards,

Sven


*** End of the template - remove these template lines ***


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (650, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.0-3-amd64 (SMP w/12 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages metar depends on:
ii  libc62.28-5
ii  libcurl3-gnutls  7.63.0-1

metar recommends no packages.

metar suggests no packages.

-- debconf-show failed



Bug#917096: graphite-web on Apache stopped working after upgrade to 1.1.4

2018-12-22 Thread Sven Paulus
Package: graphite-web
Version: 1.1.4-1
Severity: important

Dear Maintainer,

when I upgraded my graphite-web installation on Debian testing from
1.0.2+debian-2.1 to the current 1.1.4-1 version, graphite-web stopped
working. 

I'm using Apache 2.4, my configuration is exactly identical to the
sample configuration in /usr/share/graphite-web/apache2-graphite.conf

After the upgrade now all requests result in HTTP status 500:

192.168.x.y - - [22/Dec/2018:14:54:03 +0100] "POST /render HTTP/1.1" 500 707 
"https://grafana.DOMAIN/dashboard/db/homematic?refresh=1m=1; "Mozilla/5.0 
(Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/71.0.3578.98 Safari/537.36"
192.168.x.y - - [22/Dec/2018:15:00:13 +0100] "GET / HTTP/1.1" 500 707 "-" 
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/71.0.3578.98 Safari/537.36"

The following error is logged in the apache error log:

[Sat Dec 22 15:00:14.306438 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] mod_wsgi (pid=8566): Target WSGI script 
'/usr/share/graphite-web/graphite.wsgi' cannot be loaded as Python module.
[Sat Dec 22 15:00:14.306473 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] mod_wsgi (pid=8566): Exception occurred processing WSGI 
script '/usr/share/graphite-web/graphite.wsgi'.
[Sat Dec 22 15:00:14.306496 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] Traceback (most recent call last):
[Sat Dec 22 15:00:14.306518 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554]   File "/usr/share/graphite-web/graphite.wsgi", line 14, 
in 
[Sat Dec 22 15:00:14.306550 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] application = get_wsgi_application()
[Sat Dec 22 15:00:14.306562 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554]   File 
"/usr/lib/python2.7/dist-packages/django/core/wsgi.py", line 13, in 
get_wsgi_application
[Sat Dec 22 15:00:14.306582 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] django.setup(set_prefix=False)
[Sat Dec 22 15:00:14.306593 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554]   File 
"/usr/lib/python2.7/dist-packages/django/__init__.py", line 22, in setup
[Sat Dec 22 15:00:14.306625 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] configure_logging(settings.LOGGING_CONFIG, 
settings.LOGGING)
[Sat Dec 22 15:00:14.306635 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554]   File 
"/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in 
__getattr__
[Sat Dec 22 15:00:14.306652 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] self._setup(name)
[Sat Dec 22 15:00:14.306661 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554]   File 
"/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
[Sat Dec 22 15:00:14.306676 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] self._wrapped = Settings(settings_module)
[Sat Dec 22 15:00:14.306685 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554]   File 
"/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 110, in 
__init__
[Sat Dec 22 15:00:14.306699 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] mod = importlib.import_module(self.SETTINGS_MODULE)
[Sat Dec 22 15:00:14.306708 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554]   File "/usr/lib/python2.7/importlib/__init__.py", line 
37, in import_module
[Sat Dec 22 15:00:14.306724 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] __import__(name)
[Sat Dec 22 15:00:14.306744 2018] [wsgi:error] [pid 8566] [remote 
192.168.145.2:50554] ImportError: No module named graphite.settings

When I replaced libapache2-mod-wsgi with libapache2-mod-wsgi-py3 (which
made sense, since the Changelog mentioned switching to Python 3),
everything started working again.

So maybe you should consider adding an entry to NEWS.Debian I'm not sure
what I missed when performing the upgrade. 

The file /usr/share/doc/graphite-web/README.Debian still mentions the 
Python 2 module:

| Quick manual to use Graphite with Apache:
| -
| 
| # Install Apache module wsgi:
| apt-get install libapache2-mod-wsgi apache2

Regards,

Sven


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (650, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.0-3-amd64 (SMP w/12 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages graphite-web depends on:
ii  adduser 3.118
ii  python  2.7.15-3
ii  python3 3.7.1-2
ii  python3-cairo   1.16.2-1+b1
ii  python3-cairocffi   0.7.2-2.1
ii  python3-django  1:1.11.17-2
ii  python3-django-tagging  1:0.4.5-1
ii  python3-pyparsing 

Bug#833283: Debian Bug #833283

2016-10-04 Thread Sven Paulus
I observed the same problem when upgrading. It was caused by the following
line in the configuration file:

# Some `catch-all' logfiles.

Maybe a postinstall script could be added which replaces all backticks in 
comments?



Bug#596014: strip trailing whitespace from artist name and song title

2010-09-07 Thread Sven Paulus
Package: forked-daapd
Version: 0.12~git0.11-125-gca72ee5-1
Severity: wishlist
Tags: patch

The id3 tags of some of my MP3s contain trailing whitespace in the
artist or title fields. The whitespace is displayed in iTunes 
(in the small display on the top when playing a song) when
playing these MP3s using forked-daapd. This wasn't the case when
using mt-daapd or when playing directly from the iTunes library.

The attached patch fixes this behaviour:

--- /tmp/forked-daapd-0.12~git0.11-125-gca72ee5/src/filescanner.c   
2010-08-05 18:28:02.0 +0200
+++ /soft/forked-daapd-0.12~git0.11-125-gca72ee5/src/filescanner.c  
2010-09-08 00:36:46.0 +0200
@@ -131,6 +131,17 @@
   return ret;
 }
 
+static void 
+trim_string(char *s)
+{
+ char *p;
+
+ for (p = s + strlen(s) - 1; *p == ' '  p = s; p--)
+  {
+*p = '\0';
+  }
+}
+
 
 static void
 fixup_tags(struct media_file_info *mfi)
@@ -145,23 +156,50 @@
   mfi-genre = NULL;
 }
 
-  if (mfi-artist  (strlen(mfi-artist) == 0))
+  if (mfi-artist)
+{
+  if (strlen(mfi-artist)  0)
+{
+  trim_string(mfi-artist);
+}
+  if (strlen(mfi-artist) == 0)
+{
+  free(mfi-artist);
+  mfi-artist = NULL;
+}
+}
+
+  if (mfi-title)
 {
-  free(mfi-artist);
-  mfi-artist = NULL;
+  if (strlen(mfi-title)  0)
+{
+  trim_string(mfi-title);
+}
+  if (strlen(mfi-title) == 0)
+{
+  free(mfi-title);
+  mfi-title = NULL;
+}
 }
 
-  if (mfi-title  (strlen(mfi-title) == 0))
+  if (mfi-album)
 {
-  free(mfi-title);
-  mfi-title = NULL;
+  if (strlen(mfi-album)  0)
+{
+  trim_string(mfi-album);
+}
+  if (strlen(mfi-album) == 0)
+{
+  free(mfi-album);
+  mfi-album = NULL;
+}
 }
 
   if (!mfi-artist)
 {
   if (mfi-orchestra  mfi-conductor)
{
- len = strlen(mfi-orchestra) + strlen(sep) + strlen(mfi -conductor);
+ len = strlen(mfi-orchestra) + strlen(sep) + strlen(mfi-conductor);
  tag = (char *)malloc(len + 1);
  if (tag)
{




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org