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

Permalink Validation #4486

Closed
ErisDS opened this issue Nov 19, 2014 · 1 comment
Closed

Permalink Validation #4486

ErisDS opened this issue Nov 19, 2014 · 1 comment
Labels
affects:api Affects the Ghost API

Comments

@ErisDS
Copy link
Member

ErisDS commented Nov 19, 2014

This is mostly done already, but there are a few improvements / updates needed in order to ensure that permalinks saved to the database are definitely valid.

Validation of settings is handled by a special validation function which uses the configuration in default-settings.json to know how to validate each individual setting.

As you can see here there are already some validation rules for permalinks, but they are not complete.

The full spec for what constitutes a valid permalink can be found in #1631. Most notably, the :author url part is missing, there's no affordance for custom strings, and there is no assurance that at least one of :slug or :id is present.

As well as updating the rules, it would be great to see some tests added which verify that the validation is not permitting invalid permalink configs to be stored.

@ErisDS ErisDS added tests affects:api Affects the Ghost API labels Nov 19, 2014
@ErisDS ErisDS added this to the Next Backlog milestone Nov 19, 2014
@ErisDS ErisDS modified the milestone: Next Backlog Oct 9, 2015
@ErisDS ErisDS added the later [triage] Things we intend to work but are not immediate priority label Jan 18, 2017
@ErisDS
Copy link
Member Author

ErisDS commented Jan 18, 2017

Closing this for now with the later tag, we ca pick this back up if we decide to add a permalinks UI, or if this becomes a problem for channels at some point.

@ErisDS ErisDS closed this as completed Jan 18, 2017
@ErisDS ErisDS removed later [triage] Things we intend to work but are not immediate priority labels Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:api Affects the Ghost API
Projects
None yet
Development

No branches or pull requests

1 participant