laminas / laminas-mime

Create and parse MIME messages and parts
https://docs.laminas.dev/laminas-mime/
BSD 3-Clause "New" or "Revised" License
29 stars 23 forks source link

Why is that mime\part\setFileName does not encode #16

Closed glensc closed 3 years ago

glensc commented 3 years ago

Bug Report

Q A
Version(s) 2.8.0

Summary

Current behavior

the $filename is passed as-is:

How to reproduce

<?php

use Laminas\Mime;

require __DIR__ . '/vendor/autoload.php';

$part = new Mime\Part();
$part->setDisposition(Mime\Mime::DISPOSITION_ATTACHMENT);
$part->setFileName('Testá.xlsx');
$part->setContent('a');
print_r($part->getHeaders());
Content-Type: application/octet-stream
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="Testá.xlsx"

Expected behavior

The getHeaders() method should encode using *= or *1*= or at least quoted-printable.

refs:

laminas-bot commented 3 years ago

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee. If you have a security issue, please follow our security reporting guidelines. If you wish to take on the role of maintainer, please nominate yourself

If you are looking for an actively maintained package alternative, we recommend: