From 3ca0f0a4d73d3ee17500c66dedc8dc12e011a3e2 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Wed, 30 May 2018 12:23:37 +0200 Subject: [PATCH] name and email stripped from whitespace --- .gitignore | 1 + honeypot/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5a0e9b2..a81bd68 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ __pycache__/ *.so # Distribution / packaging +production.ini venv-honeypot/ .venv .Python diff --git a/honeypot/__init__.py b/honeypot/__init__.py index 3cfc9b1..87a005b 100644 --- a/honeypot/__init__.py +++ b/honeypot/__init__.py @@ -49,9 +49,9 @@ class RootResource: with open(moin_user_file, 'r') as fh: for line in fh: if line.startswith('email='): - email = line.split('=', 1)[1] + email = line.split('=', 1)[1].strip() if line.startswith('name='): - name = line.split('=', 1)[1] + name = line.split('=', 1)[1].strip() except: pass return name, email