owner may be null even without error
This commit is contained in:
@@ -81,7 +81,7 @@ async function getAcmeApi(domainObject) {
|
||||
// we simply update the account with the latest email we have each time when getting letsencrypt certs
|
||||
// https://github.com/ietf-wg-acme/acme/issues/30
|
||||
const [error, owner] = await safe(users.getOwner());
|
||||
apiOptions.email = error ? 'webmaster@cloudron.io' : owner.email; // can error if not activated yet
|
||||
apiOptions.email = (error || !owner) ? 'webmaster@cloudron.io' : owner.email; // can error if not activated yet
|
||||
|
||||
const accountKeyPem = await blobs.get(blobs.ACME_ACCOUNT_KEY);
|
||||
if (!accountKeyPem) throw new BoxError(BoxError.NOT_FOUND, 'acme account key not found');
|
||||
|
||||
Reference in New Issue
Block a user