https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8426

            Bug ID: 8426
           Summary: URI canonicalisation deletes a zero octet
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

Created attachment 6095
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=6095&action=edit
Fix and updated tests

When uri_list_canonicalize strips leading zeros from each octet, a lone 0 gets
stripped to nothing.

Steps to reproduce:

The attached fix contains a patch to t/uri.t which adds these four test cases
with their expected results. Apply the patch to trunk and reproduce the bug by
reverting the fixed code in Util.pm and running the patched tests t/uri.t

'http://127.0.0.1:8198/second'
'http://10.0.0.0/x'
'http://0xcb.0x0.0x71.0xa/x'
'http://0313.00.0161.012/x'

The fix is to one regex in Util.pm

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

Reply via email to