0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-04 02:01:58 -05:00
ghost/core/server/models
Aileen Nowak 982a75d6be 🐛 Fixed slugs from exceeding db limit (#9251)
closes #8143

Fixed a potential issue (edge-case), where our generated and validated (in terms of check for existance and add a counter) would return a slug, that will exceed the maximum length of the slug fields (191 chars).

This is mostly possible for the post title, which can be 255 chars long and would generate a slug with the same length. This would prevent the user from actually saving a post.

I tried first to determine the expected length for a slug that already exists, but decided that the **easier** and simplyfied implementation is to always cut a slug to **185 chars** (+ counter). This makes it easier to find duplicates and includes a possible high number of counts (edge-edge-case).

The slug will not be cut down to 185 chars if it's an import.
2017-11-21 14:21:22 +01:00
..
base 🐛 Fixed slugs from exceeding db limit (#9251) 2017-11-21 14:21:22 +01:00
plugins 🐛 Fixed pagination error (#9243) 2017-11-14 12:47:58 +00:00
accesstoken.js 🎨 register events in base model (#7560) 2016-10-14 13:37:01 +01:00
app-field.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
app-setting.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
app.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
client-trusted-domain.js Add table columns for OAuth 2015-09-02 13:39:22 +01:00
client.js 🎨 😎 config env usages (#7929) 2017-02-03 18:25:39 +00:00
index.js 🎨 Separate invites from user 2016-09-26 11:08:43 +02:00
invite.js 🎨 invites roles table into a field on the invites table (#7705) 2016-11-16 09:33:44 +00:00
permission.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
post.js Allow forUpdate for any model 2017-11-14 10:22:09 +00:00
refreshtoken.js Misc cleanup: moving files & naming functions 2015-06-15 09:43:19 +01:00
role.js Support for attribute-based permissions (#9025) 2017-09-26 18:06:14 +02:00
settings.js Refactored to save settings only if value changes (#9194) 2017-10-31 15:47:30 +00:00
subscriber.js Support for attribute-based permissions (#9025) 2017-09-26 18:06:14 +02:00
tag.js Switch to Eslint (#9197) 2017-11-01 13:44:54 +00:00
user.js Changed logic for importPersistUser option (#9203) 2017-11-07 09:09:57 +01:00