From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by gnuweeb.org (Postfix) with ESMTPSA id 6B0D67E6B8 for ; Sun, 6 Mar 2022 11:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1646565353; bh=vpBJEcTDWpKE40Lb9Kf+ytF2+6s9OamgwEy0yzQg1Ig=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qO/TV3jBf4oXp6nteNSiMSsLCbDaC+nUZgUYqwz1+HRjLs0h4vnk81dkAnG8Mie9J YJIWUbAIBLab0v4M20LmzW/zF38XRRfXgJkYxzG2GJ5rVVmoM3Nlxn1t8Odoc0eLIN O7N+DDX7yU1DiawT6LKYuFB2pPIS+yfZhcAzFB+UptogbWWiQ/LI1MNIqwAr/mGZuO YekHoEwXmGYnNg8Jzeza5pcA3rUeZKKOBMklTwacWdQxuhRodK0Oihy0qZCTLU8sXv JWgJC9gf1kZglJzZz7juc5gXzS6QCTKAcwsW+oUk9hi0RmG3eyTvxocxszAshzpZyX 1Hx2ZImH9qFYw== Received: by mail-lj1-f182.google.com with SMTP id u3so197180ljd.0 for ; Sun, 06 Mar 2022 03:15:53 -0800 (PST) X-Gm-Message-State: AOAM533nXSDG0S2du7b1fl/e+I3775xbaMu6+WboWuRf8VUK8o1cSLhN 7LOd52ctPzDsca5/bOKfNC8gWyXXEuQ1SDBeags= X-Google-Smtp-Source: ABdhPJw1t7E6VjQEYppBRQVdxAxdyGotMnHZyRPAKdHLpljGJvWDmK0xCsHROqXAxYZ3Of57k2eMSurwdRZxSZHCxm0= X-Received: by 2002:a2e:9081:0:b0:247:d94b:c7b9 with SMTP id l1-20020a2e9081000000b00247d94bc7b9mr4291724ljg.92.1646565351491; Sun, 06 Mar 2022 03:15:51 -0800 (PST) MIME-Version: 1.0 References: <9b92db3f-499a-3bd5-baac-b66495cf44c5@gnuweeb.org> <41f72887-ceae-fcf4-d944-a92fffeb4339@gnuweeb.org> In-Reply-To: <41f72887-ceae-fcf4-d944-a92fffeb4339@gnuweeb.org> From: Alviro Iskandar Setiawan Date: Sun, 6 Mar 2022 18:15:40 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: test debug To: Ammar Faizi Cc: "GNU/Weeb Mailing List" , Alviro Iskandar Setiawan Content-Type: text/plain; charset="UTF-8" List-Id: On Sun, Mar 6, 2022 at 6:12 PM Ammar Faizi wrote: > On 3/6/22 6:08 PM, Alviro Iskandar Setiawan wrote: > > On Sun, Mar 6, 2022 at 6:04 PM Ammar Faizi wrote: > > > On 3/6/22 6:03 PM, Alviro Iskandar Setiawan wrote: > > > > test again > > > > > > Got your email! > > > > > > > I think this regex is wrong sir, if the message-id is located at the > > end of the header, we will not have double LF, because it's already > > split by the explode. > > > > if (!preg_match("/(?:^|\\n)message-id:\s+?(.+?)(?:\\n\S+\:|\\n\\n)/si", > > $hdr, $m)) { > > $err = "Cannot get the \"message-id\" line"; > > goto out; > > } > > Oh right, I forgot that we've already split it before parsing. > > > maybe we should use this: > > > > "/(?:^|\\n)message-id:\s+?(.+?)(?:\\n\S+\:|$)/si" > > That one looks good to me, we should also fix other headers too. I will send a patch to fix this, maybe tonight -- Viro