From b15c236da246df0098fa3228283bf393bb26c169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Mon, 21 Dec 2020 15:29:30 +0100 Subject: [PATCH] Fix the data-line parsing --- opensmtpd/src/parsers/parameters.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opensmtpd/src/parsers/parameters.rs b/opensmtpd/src/parsers/parameters.rs index 9018250..128c933 100644 --- a/opensmtpd/src/parsers/parameters.rs +++ b/opensmtpd/src/parsers/parameters.rs @@ -4,7 +4,7 @@ use super::{ }; use crate::{Address, AuthResult, FilterKind, FilterPhase, MailResult, Method}; use nom::branch::alt; -use nom::bytes::streaming::{tag, take_while1}; +use nom::bytes::streaming::{tag, take_while, take_while1}; use nom::combinator::{map_res, opt}; use nom::IResult; use std::net::SocketAddr; @@ -34,7 +34,7 @@ pub(crate) fn parse_filter_connect( pub(crate) fn parse_filter_data_line(input: &[u8]) -> IResult<&[u8], &[u8]> { let (input, _) = parse_delimiter(input)?; - let (input, s) = take_while1(is_body_char)(input)?; + let (input, s) = take_while(is_body_char)(input)?; let (input, _) = parse_eol(input)?; Ok((input, s)) }