🐛 protect setup (#8030)

refs #7452

- we have to query the owner user by "inactive" status
- otherwise it is possible to override the owner's email address
This commit is contained in:
Katharina Irrgang 2017-02-27 20:07:00 +01:00 committed by Hannah Wolfe
parent 63723aa36a
commit dfde5d14f1

View File

@ -115,7 +115,7 @@ strategies = {
};
handleSetup = function handleSetup() {
return models.User.findOne({slug: 'ghost-owner', status: 'all'}, options)
return models.User.findOne({slug: 'ghost-owner', status: 'inactive'}, options)
.then(function fetchedOwner(owner) {
if (!owner) {
throw new errors.NotFoundError({message: i18n.t('errors.models.user.userNotFound')});