Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid header value detected - for diacritics #209

Open
cbichis opened this issue Aug 14, 2022 · 0 comments
Open

Invalid header value detected - for diacritics #209

cbichis opened this issue Aug 14, 2022 · 0 comments
Labels
Bug Something isn't working

Comments

@cbichis
Copy link

cbichis commented Aug 14, 2022

Bug Report

2.10.0

Summary

It seems Laminas mail has issues with diacritics, at least within TO header.

Current behavior

2022-08-14T15:51:00+03:00 ERR (3): Invalid header value detected {"file":"/project/vendor/laminas/laminas-mail/src/Header/HeaderValue.php","line":107,"trace":"[{"file":"/project/vendor/laminas/laminas-mail/src/Header/AbstractAddressList.php","line":183,"function":"assertValid","class":"Laminas\\Mail\\Header\\HeaderValue","type":"::"},{"file":"/project/vendor/laminas/laminas-mail/src/Header/AbstractAddressList.php","line":227,"function":"getFieldValue","class":"Laminas\\Mail\\Header\\AbstractAddressList","type":"->"},{"file":"/project/vendor/laminas/laminas-mail/src/Headers.php","line":491

How to reproduce

Use an email address containing accents on TO address. Setting encoding to UTF-8 doesnt seems to help.

		$message = new \Laminas\Mail\Message();
		$message->setEncoding('UTF-8')
			->setTo('xyz.ciucă@yahoo.com')
			->getHeaders()->toString();

Expected behavior

Validate the email addresses even with diacritics.

@cbichis cbichis added the Bug Something isn't working label Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant