Skip to content

reports: use basename for report attachment filename#406

Merged
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:fix/report-attachment-filename
Jun 5, 2026
Merged

reports: use basename for report attachment filename#406
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:fix/report-attachment-filename

Conversation

@thegushi

@thegushi thegushi commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

The attachment Content-Disposition header was using the full spool file path as the filename, so recipients would receive attachments named like:

_var_db_opendmarc_reporter.example!domain.example!begin!end.xml.gz

instead of the RFC 7489 section 7.2 compliant:

reporter.example!domain.example!begin!end.xml.gz

\$gzipfile is the full path (\$workdir . "/" . \$repdom . "!" . \$domain . ...). File::Basename is already imported at the top of the script; this fix wraps the filename in basename().

The attachment Content-Disposition was using the full spool file path
($gzipfile) as the filename, causing report attachments to be named
e.g. '_var_db_opendmarc_example.com!domain.com!begin!end.xml.gz'
instead of 'example.com!domain.com!begin!end.xml.gz'.  File::Basename
is already imported; use it.
@thegushi thegushi merged commit afd2960 into trusteddomainproject:develop Jun 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant