mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
🐛 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:
parent
63723aa36a
commit
dfde5d14f1
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ strategies = {
|
||||||
};
|
};
|
||||||
|
|
||||||
handleSetup = function handleSetup() {
|
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) {
|
.then(function fetchedOwner(owner) {
|
||||||
if (!owner) {
|
if (!owner) {
|
||||||
throw new errors.NotFoundError({message: i18n.t('errors.models.user.userNotFound')});
|
throw new errors.NotFoundError({message: i18n.t('errors.models.user.userNotFound')});
|
||||||
|
|
Loading…
Add table
Reference in a new issue