You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better ContentType.Name validation on composed values #128637
System.Net.Mail.Attachment (and likely AlternateView) has ContentType property which has Name property which itself has validation based on MimeBasePart.DecodeEncoding used in setter, however if encoding is detected at the beginning of string, it do not validate rest of it, allowing to interfere with other parts MailMessage/Attachment/AlternateView. For example, following code sent attachment with name foo.txt instead of test.txt as specified in constructor param.
changed the title [-]Better ContentType.Name validaiton on composed values[/-][+]Better ContentType.Name validation on composed values[/+]on Jun 26, 2026
Activity
dotnet-policy-service commentedon May 27, 2026
Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.
[-]Better ContentType.Name validaiton on composed values[/-][+]Better ContentType.Name validation on composed values[/+]MihaZupan commentedon Sep 24, 2026
Similar holds for other properties in the area, like
ContentDisposition.DispositionType,AttachmentBase.ContentId...