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

Fix #40 - Add quotes to dns data #41

Merged
merged 1 commit into from
Aug 21, 2019
Merged

Conversation

shavit
Copy link
Contributor

@shavit shavit commented Aug 21, 2019

Add quotes around TXT data if not exist. The issue is that the client is not aware of the type of the record, and the API will not accept TXT without quotes.

The commands dns record create and dns record update have consistent behavior with the data flag

  • This will work new_value, "\"new_value\""
  • This will not work \"new_value\"

Description

Guess with a regular expression if the record is TXT, and wrap the data in quotes. If the record data has already quotes, it will not escape them. In this case the user must escape the TXT value.

Related Issues

Fixes #40

Checklist:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you linted your code locally prior to submission?
  • Have you successfully ran tests with your changes locally?

Add quotes around TXT data if not exist. The issue is that the client is not aware of the type of the record, and the API will not accept TXT without quotes.
@ddymko ddymko added the bug Something isn't working label Aug 21, 2019
Copy link
Contributor

@ddymko ddymko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching and patching this! Looks like an strange behavior with our API not properly handling this - we will look into that as well.

@ddymko ddymko merged commit f52d3d9 into vultr:master Aug 21, 2019
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

Successfully merging this pull request may close these issues.

[BUG] - Record data must be enclosed in quotes
2 participants