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

Add basic validations for Product slugs #169

Merged
merged 1 commit into from
Nov 6, 2015
Merged

Add basic validations for Product slugs #169

merged 1 commit into from
Nov 6, 2015

Conversation

c-lliope
Copy link
Contributor

@c-lliope c-lliope commented Nov 6, 2015

Closes #162

Problem:

On the demo site, it's rather simple for users to craft product names
that don't translate into valid slugs.

When Rails tries to render links to these products, it throws a 500
error because it cannot generate a correct URL.

Solution:

Add validators to ensure that all products have a valid and unique slug.

@c-lliope
Copy link
Contributor Author

c-lliope commented Nov 6, 2015

Merging without review because:

  1. Doesn't affect the library
  2. Fairly straightforward
  3. Fixes a security hole on the demo site

Problem:

On the demo site, it's rather simple for users to craft product names
that don't translate into valid slugs.

When Rails tries to render links to these products, it throws a 500
error because it cannot generate a correct URL.

Solution:

Add validators to ensure that all products have a valid and unique slug.
@c-lliope c-lliope merged commit 0a92fca into master Nov 6, 2015
@c-lliope c-lliope deleted the gw-validations branch November 6, 2015 13:19
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 this pull request may close these issues.

1 participant