Browse Source

Fix parsing bug of 'From' headers with no '@' symbol

master
Max Erenberg 6 months ago
parent
commit
49e570517e
  1. 2
      csc_milter/main.py
  2. 6
      debian/changelog
  3. 1
      debian/source/options
  4. 2
      setup.py

2
csc_milter/main.py

@ -84,7 +84,7 @@ class CSCMilter(Milter.Base):
if field != 'from':
return Milter.CONTINUE
addr = parseaddr(value)[1]
if addr == '':
if '@' not in addr:
return Milter.CONTINUE
domain = addr.split('@')[1].lower()
if not is_in_myorigin(domain):

6
debian/changelog vendored

@ -1,3 +1,9 @@
csc-milter (0.2.2-1) buster; urgency=medium
* Fix parsing bug of 'From' headers with no '@' symbol.
-- Max Erenberg <merenber@csclub.uwaterloo.ca> Fri, 25 Feb 2022 05:32:39 +0000
csc-milter (0.2.1-1) buster; urgency=medium
* Add config file.

1
debian/source/options vendored

@ -0,0 +1 @@
extend-diff-ignore = "^(dist/|.+\.egg-info/|build/)|__pycache__/|(^|/)\..+"

2
setup.py

@ -16,7 +16,7 @@ class PyTest(TestCommand):
setup(
name='csc-milter',
version='0.2.1',
version='0.2.2',
description='Custom milter for CSC',
long_description=long_description,
long_description_content_type='text/markdown',

Loading…
Cancel
Save