Fix parsing bug of 'From' headers with no '@' symbol
This commit is contained in:
parent
06d73731d6
commit
49e570517e
|
@ -84,7 +84,7 @@ class CSCMilter(Milter.Base):
|
||||||
if field != 'from':
|
if field != 'from':
|
||||||
return Milter.CONTINUE
|
return Milter.CONTINUE
|
||||||
addr = parseaddr(value)[1]
|
addr = parseaddr(value)[1]
|
||||||
if addr == '':
|
if '@' not in addr:
|
||||||
return Milter.CONTINUE
|
return Milter.CONTINUE
|
||||||
domain = addr.split('@')[1].lower()
|
domain = addr.split('@')[1].lower()
|
||||||
if not is_in_myorigin(domain):
|
if not is_in_myorigin(domain):
|
||||||
|
|
|
@ -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
|
csc-milter (0.2.1-1) buster; urgency=medium
|
||||||
|
|
||||||
* Add config file.
|
* Add config file.
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
extend-diff-ignore = "^(dist/|.+\.egg-info/|build/)|__pycache__/|(^|/)\..+"
|
2
setup.py
2
setup.py
|
@ -16,7 +16,7 @@ class PyTest(TestCommand):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='csc-milter',
|
name='csc-milter',
|
||||||
version='0.2.1',
|
version='0.2.2',
|
||||||
description='Custom milter for CSC',
|
description='Custom milter for CSC',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
|
|
Loading…
Reference in New Issue