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

Domains: TXT record's value validation is broken #3328

Closed
klimeryk opened this issue Feb 16, 2016 · 3 comments
Closed

Domains: TXT record's value validation is broken #3328

klimeryk opened this issue Feb 16, 2016 · 3 comments
Assignees
Labels
[Feature Group] Emails & Domains Features related to email integrations and domain management. [Type] Bug

Comments

@klimeryk
Copy link
Contributor

  • The value is being unnecessarily sanitized (lower case, strip whitespace)
  • It's possible to submit an empty value (but the backend thankfully rejects that)
@klimeryk klimeryk added [Type] Bug [Feature Group] Emails & Domains Features related to email integrations and domain management. labels Feb 16, 2016
@klimeryk klimeryk changed the title TXT record's value validation is broken Domains: TXT record's value validation is broken Feb 16, 2016
@andrewspittle
Copy link

I can confirm this happens in Calypso (and does not happen within the WP Admin Dashboard).

To reproduce:

  1. Go to the Domain Management screen.
  2. Select a WordPress.com site that has a domain mapped to it.
  3. Select the mapped domain name.
  4. Click "DNS Records"
  5. Click "Add New DNS Record"
  6. Select a TXT record.
  7. Leave the "Name" field blank.
  8. Enter a value in the "Text" field that includes a mix of uppercase and lowercase records. For example, Google's example site verification value: google-site-verification=rXOxyZounnZasA8Z7oaD3c14JdjS9aKSWvsR1EbUSIQ
  9. Save the new TXT record.
  10. The TXT record will be converted to lowercase.

When attempting the same TXT record addition through WP Admin (via Store > My Domains) the value saves correctly and preserves the upper and lowercase values.

This bug causes validation issues for services like Campaign Monitor that rely on TXT keys with mixed case values. Example.

@klimeryk
Copy link
Contributor Author

Thanks for additional testing, @andrewspittle! Since this seems like an urgent issue (and I feel guilty, because it was me who introduced this regression 😞), I've created a PR with a fix (#3585). Let me know if it works for you :)

@BrookeDot
Copy link
Contributor

#3585 worked for me in calypso.localhost:3000

klimeryk added a commit that referenced this issue Feb 26, 2016
A nice side-effect of this change is that the selected record does not
reset to 'A' after every submit.

Fixes #3328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Emails & Domains Features related to email integrations and domain management. [Type] Bug
Projects
None yet
Development

No branches or pull requests

3 participants