alexreinert/ARSoft.Tools.Net

The ExpandMacroAsync method formats the 'd' case incorrectly

Closed this issue · 3 comments

When the spf record below is validated the %{d} parts gets an additional dot which invalidates the resulting domain name. The DomainName.Parse method throws an exception.

v=spf1 include:%{ir}.%{v}.%{d}.spf.has.pphosted.com -all

The issue is the case "d" at line 556. More precisely line 557. The domain.ToString() returns a domain name with a dot prefix. This causes two dots and invalidates the resulting string.

Fixed in version 3.1.1

lukos commented

Please can you link to where the change was made? We can't upgrade to v3 because it is .net 6 only and we are on netstandard so will need to backport the fix.

Thx

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.