Updated BookController:store method to sanitize input#614
Updated BookController:store method to sanitize input#614ptcrash wants to merge 1 commit intoBookStackApp:masterfrom ptcrash:LookLittleJohn-patch-1
Conversation
Fixed a bug where a person could mess up the router by having books with slashes in the name as well as create books with the name of reserved words.
|
Thank you for your pull request. In regards to slashes in the names, These should be stripped when URL slugs are generated. This pull request would prevent spaces or underscores from being able to be used within Book names which I'd prefer to allow. The usage of keywords is a good point. I do think we should add something to prevent clashes but I don't think it should be part of the name validation logic but instead part of the slug generation. Keywords should still be able to be used for book/page/chapter names if specified, We would just generate non-conflicting slugs. |
|
Sounds good! I've got some spare time this weekend - I'll propose an update for y'all then 😄 |
|
Now closing this as the core issues has been mitigated through a different solution within 1a9f676 |
Fixed a bug where a person could mess up the router by having books with slashes in the name as well as create books with the name of the
create, which makes a book that is totally accessible since the route/books/createis already used for the book creation view.