Ghost/core/server
Kevin Ansfield 8d5e7ed695
🐛 Fixed unsubscribed members receiving email when a post is sent to all members (#13181)
refs https://github.com/TryGhost/Team/issues/935

The problem was incorrect operator precedence when multiple statements existed in the filter original filter when we transform it to enforce `subscribed:true` before sending.

- free only - subscribed:true+status:free - no issue
- paid only - subscribed:true+status:-free - no issue
- all - subscribed:true+status:-free,status:free - the ,status:free part is treated as a separate OR statement meaning the subscribed:true is not applied to it and free members that are unsubscribed will receive the email

- extracted the filter transform into a separate function so it can be unit tested
- updated the transform to use `()` for operator precedence, eg: `subscribed:true+(status:-free,status:free)`
- used transform function in `addEmail()` and `getEmailMemberRows()`
- fixed `sent/send` typo in error message
2021-07-26 12:47:03 +01:00
..
adapters Fixed slow-running scheduling default test 2021-07-15 13:50:59 +04:00
api Removed use of i18n in snippets controllers 2021-07-19 11:08:55 +01:00
data Removed use of deprecated new Error() syntax 2021-07-19 21:31:31 +12:00
lib Moved settings/cache to shared/settings-cache 2021-06-30 15:49:10 +01:00
models 🔒 Fixed permissible method for Integration Model 2021-07-20 13:43:29 +01:00
public New logo in Admin (#12768) 2021-03-18 17:27:27 +00:00
services 🐛 Fixed unsubscribed members receiving email when a post is sent to all members (#13181) 2021-07-26 12:47:03 +01:00
views Added new, simpler, linear boot process 2021-02-08 11:56:44 +00:00
web Exposed Members pub keys on /members/.well-known/ (#13163) 2021-07-20 13:19:31 +01:00
analytics-events.js Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00
ghost-server.js Switch to @tryghost/debug, remove ghost-ignition 2021-06-15 17:24:22 +01:00
notify.js Change to use @tryghost/logging 2021-06-15 15:59:11 +01:00
overrides.js Moved sqlite3 override rules to db connection lib 2021-02-05 11:51:56 +00:00
run-update-check.js Added protective code to update-check job 2021-06-29 14:02:16 +04:00
update-check.js Fixed critical alerts sending to admin users 2021-07-07 11:29:18 +04:00