Bug 905097 - fail2ban logs unicode BOM at beginning of syslog messages containing host names
Summary: fail2ban logs unicode BOM at beginning of syslog messages containing host names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fail2ban
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-28 15:16 UTC by Jonathan Kamens
Modified: 2013-03-14 23:59 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-14 23:59:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jonathan Kamens 2013-01-28 15:16:11 UTC
In Fedora 18, I've started seeing log messages that look like this in /var/log/messages:

/var/log/messages-20130106.gz:Jan  5 08:27:01 jik2 \357\273\277fail2ban.filter : WARNING Determined IP using DNS Reverse Lookup: mail.epackage.com.tw = ['220.130.160.43']

I've written out "\357\273\277" for illustrative purposes, but in syslog it's the actual eight-bit characters shown by those octal escape codes.

I think the actual problem is lower in the stack than fail2ban, but I suspect it's going to be very expensive and time-consuming to fix it lower down, and it's trivially easy to fix the problem within fail2ban:

--- /usr/share/fail2ban/server/failregex.py	2013/01/25 16:09:03	1.1
+++ /usr/share/fail2ban/server/failregex.py	2013/01/25 16:09:20
@@ -130,4 +130,4 @@
 			s = self._matchCache.string
 			r = self._matchCache.re
 			raise RegexException("No 'host' found in '%s' using '%s'" % (s, r))
-		return host
+		return str(host)

Comment 1 Jonathan Kamens 2013-03-13 19:49:26 UTC
The fix for this that's in updates-testing right now works for me, and I just gave it positive karma. I'm confused, though, about why a comment wasn't added automatically here indicating that there was a fix in updates-testing.

Also, judging from the changelog, the person who built the update that's in testing is not the person to whom this bug is assigned. Shouldn't the bug be updated to reflect who did the fix?

Comment 2 Fedora Update System 2013-03-13 19:55:37 UTC
fail2ban-0.8.8-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2013-2525/fail2ban-0.8.8-3.fc18

Comment 3 Orion Poplawski 2013-03-13 19:56:52 UTC
Forgot to link the bug.

Comment 4 Fedora Update System 2013-03-14 23:59:20 UTC
fail2ban-0.8.8-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.