Browse Source

name and email stripped from whitespace

main
Holger Frey 7 years ago
parent
commit
3ca0f0a4d7
  1. 1
      .gitignore
  2. 4
      honeypot/__init__.py

1
.gitignore vendored

@ -8,6 +8,7 @@ __pycache__/
*.so *.so
# Distribution / packaging # Distribution / packaging
production.ini
venv-honeypot/ venv-honeypot/
.venv .venv
.Python .Python

4
honeypot/__init__.py

@ -49,9 +49,9 @@ class RootResource:
with open(moin_user_file, 'r') as fh: with open(moin_user_file, 'r') as fh:
for line in fh: for line in fh:
if line.startswith('email='): if line.startswith('email='):
email = line.split('=', 1)[1] email = line.split('=', 1)[1].strip()
if line.startswith('name='): if line.startswith('name='):
name = line.split('=', 1)[1] name = line.split('=', 1)[1].strip()
except: except:
pass pass
return name, email return name, email

Loading…
Cancel
Save