wolfcms/wolfcms — pull request #491 by marekmurawski (2013-04-15 07:01:59+00:00)
Title: Slug validation/csrf error in edit page

Martijn, please include this in 0.7.6 re-release :smile:

### Slug validation

Slug validation bug - slug wasn't actually checked due to if statement parentheses/logic error. This way user could enter page slug with forbidden chars like "/\#&" etc.

Now slug is properly checked against Validate::slug()

### CSRF upon errors

If user entered invalid value which generated Flash error, the CSRF token used for regenerated View was set with invalid path so user additionally got "Invalid CSRF token found" message.

This forced user to load clean (non-POST) version of page and start all edits again.

Fixed CSRF for View to reflect the same path as POSTing page (page/edit/# or page/add)