Mailing List Archive

[Bug 8214] New: __HAS_ANY_URI matches non-URI
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8214

Bug ID: 8214
Summary: __HAS_ANY_URI matches non-URI
Product: Spamassassin
Version: 3.4.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: spamassassin
Assignee: dev@spamassassin.apache.org
Reporter: apache-bugzilla@robert-scheck.de
Target Milestone: Undefined

As of writing, the rule SCC_BODY_URI_ONLY matches for the e-mail below:

--- 8< ---
Return-Path: <contact-form@example.net>
Received: by web-29.example.net (Postfix, from userid 1013)
id E3D2321DC6; Tue, 30 Jan 2024 15:08:25 +0100 (CET)
Reply-To: John Doe <john.doe@example.com>
To: info@example.net
Subject: Contact form request via example.net
From: Website <contact-form@example.net>
Message-ID: <c9953f87b75e3b5097036830b12efa16@example.net>
MIME-Version: 1.0
Date: Tue, 30 Jan 2024 15:08:25 +0100
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Name: John Doe
Company: ACME Ltd.
Telephone: +00000000000
E-Mail: john.doe@example.com
Your message: Dear Sir/Madam,
We are interested in your product ABC.
Please send us more details and photos.
Kind regards,
John Doe/ACME
--- 8< ---

When tracking this down (72_active.cf), it looks like this:


meta SCC_BODY_URI_ONLY T_SCC_BODY_TEXT_LINE < 2 && __HAS_ANY_URI
&& !__SMIME_MESSAGE
meta T_SCC_BODY_TEXT_LINE __SCC_BODY_TEXT_LINE_FULL -
__SCC_SUBJECT_HAS_NON_SPACE
tflags T_SCC_BODY_TEXT_LINE nice
body __SCC_BODY_TEXT_LINE_FULL /^\s*\S/
tflags __SCC_BODY_TEXT_LINE_FULL multiple maxhits=3
header __SCC_SUBJECT_HAS_NON_SPACE Subject =~ /\S/
uri __HAS_ANY_URI /^\w+:\/\//

Astonishingly, __HAS_ANY_URI matches, and replacing "example.net" by
"exampleXnet" no longer leads to a match. Aside, I'm not really sure why
T_SCC_BODY_TEXT_LINE is lower than 2, given the e-mail has multiple lines (I
somehow remember that body lines are concatenated first, then body rules are
applied?).

Why does __HAS_ANY_URI match a non-URI (according to my understanding of RFC
3986), such as example.net?

--
You are receiving this mail because:
You are the assignee for the bug.