0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server
Katharina Irrgang 04c60b4ce1
🐛 Fixed private blogging getting enabled when saving any setting (#10576)
no issue

- Reported here: https://forum.ghost.org/t/in-version-2-16-3-found-bug/6065/3

---

Admin Client sends false or true booleans for `is_private` key.

The settings table has two columns "key" and "value". And "value" is always type TEXT.

If you pass value=false, the db will transform this value into "0".
`settingsCache.get('is_private')` is then always true, even though the value is meant to be false.

We should add a migration in v3 and normalize all setting values to ensure consistent database values. Furthermore, we should improve the handling around settings values in general.

For now, we protect parsing values from DB, which we anyway need to transform the values into the correct data type, because we always save strings. This will protect values being stored as "false" or "1" or whatever.
2019-03-06 12:56:26 +01:00
..
adapters Removed superagent dependency (#10535) 2019-03-04 15:59:38 +08:00
api 🐛 Fixed private blogging getting enabled when saving any setting (#10576) 2019-03-06 12:56:26 +01:00
apps Updated TODO's 2019-02-27 18:08:36 +01:00
config 🐛 Fixed custom certificate usage for MySQL (#10573) 2019-03-06 10:28:10 +01:00
data Added members permission migrations 2019-02-26 15:43:36 +07:00
helpers 🐛 Supported "false" as absolute attribute value (#10556) 2019-03-04 11:23:42 +01:00
lib Refactored members auth flow with dynamic settings 2019-02-26 15:43:36 +07:00
models 🐛 Fixed private blogging getting enabled when saving any setting (#10576) 2019-03-06 12:56:26 +01:00
public Removed change frequency and priority fields from sitemap generator (#9771) 2018-09-24 19:16:31 +02:00
services 🐛 Fixed v0.1 username/password authentication 2019-03-06 10:48:21 +01:00
translations Improved error message when attempting to use disabled v0.1 Public API (#10562) 2019-03-05 10:41:07 +00:00
views Aliased {{@blog}} as {{@site}} in the theme API 2019-01-04 12:17:32 +00:00
web Refactored members auth flow with dynamic settings 2019-02-26 15:43:36 +07:00
analytics-events.js Added back "theme.uploaded" analytics event (#10450) 2019-02-05 17:38:40 +01:00
filters.js
ghost-server.js
index.js De-aliased api versions in codebase (#10375) 2019-01-14 19:49:55 +01:00
overrides.js
update-check.js De-aliased api versions in codebase (#10375) 2019-01-14 19:49:55 +01:00