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

The addTypeValue function doesn't properly escape BEFORE and AFTER values #549

Closed
jarri2di opened this issue Jan 11, 2020 · 0 comments · Fixed by #554
Closed

The addTypeValue function doesn't properly escape BEFORE and AFTER values #549

jarri2di opened this issue Jan 11, 2020 · 0 comments · Fixed by #554

Comments

@jarri2di
Copy link

The addTypeValue function uses quoted literal values instead of escaped values, causing errors during migrations.

const beforeStr = before ? ` BEFORE ${mOptions.literal(before)}` : ''
const afterStr = after ? ` AFTER ${mOptions.literal(after)}` : ''

I believe the lines should be updated to the following:

const beforeStr = before ? ` BEFORE ${escapeValue(before)}` : ''
const afterStr = after ? ` AFTER ${escapeValue(after)}` : ''

Happy to submit a PR if that would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant