mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	email-mirror: Catch ValueError returned by decode_email_address
This indicates that we didn't get the right sort of email address passed to us. (imported from commit 26881d537296ea3d21ac29ff1b67ab260f838e13)
This commit is contained in:
		@@ -166,7 +166,7 @@ def extract_and_upload_attachments(message):
 | 
			
		||||
def extract_and_validate(email):
 | 
			
		||||
    try:
 | 
			
		||||
        stream_name, token = decode_email_address(email)
 | 
			
		||||
    except TypeError:
 | 
			
		||||
    except (TypeError, ValueError):
 | 
			
		||||
        raise ZulipEmailForwardError("Malformed email recipient " + email)
 | 
			
		||||
 | 
			
		||||
    if not valid_stream(stream_name, token):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user