We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For a TXT record like example.org. TXT 300 v=spf1 mx include:spf.example.com -all the parser ignores the content after the first space.
example.org. TXT 300 v=spf1 mx include:spf.example.com -all
TXT records are allowed to have multiple "character strings" so this behaviour is valid
I replaced the fromText method to resolve the issue. This also fixes content with multiple quoted strings, like "foo bar" "foo baz"
"foo bar" "foo baz"
public function fromText(string $text): void { $string = new StringIterator($text); $txt = new StringIterator(); while ($string->valid()) { if ($string->is(static::WHITESPACE)) { $string->next(); continue; } if ($string->is(Tokens::DOUBLE_QUOTES)) { self::handleTxt($string, $txt); $string->next(); $txt->append(' '); continue; } static::handleContiguousString($string, $txt); $string->next(); $txt->append(' '); } $this->setText(trim((string) $txt), true); }
The text was updated successfully, but these errors were encountered:
Fix TXT records without quotation marks
763facb
Inspired by this comment: Badcow#116
What test cases need to be added?
Sorry, something went wrong.
No branches or pull requests
For a TXT record like
example.org. TXT 300 v=spf1 mx include:spf.example.com -all
the parser ignores the content after the first space.TXT records are allowed to have multiple "character strings" so this behaviour is valid
I replaced the fromText method to resolve the issue. This also fixes content with multiple quoted strings, like
"foo bar" "foo baz"
The text was updated successfully, but these errors were encountered: