const fixes
This commit is contained in:
@@ -306,7 +306,7 @@ async function checkSpf(domain, mailFqdn) {
|
||||
|
||||
let i;
|
||||
for (i = 0; i < txtRecords.length; i++) {
|
||||
let txtRecord = txtRecords[i].join(''); // https://agari.zendesk.com/hc/en-us/articles/202952749-How-long-can-my-SPF-record-be-
|
||||
const txtRecord = txtRecords[i].join(''); // https://agari.zendesk.com/hc/en-us/articles/202952749-How-long-can-my-SPF-record-be-
|
||||
if (txtRecord.indexOf('v=spf1 ') !== 0) continue; // not SPF
|
||||
spf.value = txtRecord;
|
||||
spf.status = spf.value.indexOf(` a:${mailFqdn}`) !== -1;
|
||||
@@ -728,7 +728,7 @@ async function clearDomains() {
|
||||
|
||||
// remove all fields that should never be sent out via REST API
|
||||
function removePrivateFields(domain) {
|
||||
let result = _.pick(domain, 'domain', 'enabled', 'mailFromValidation', 'catchAll', 'relay', 'banner');
|
||||
const result = _.pick(domain, 'domain', 'enabled', 'mailFromValidation', 'catchAll', 'relay', 'banner');
|
||||
if (result.relay.provider !== 'cloudron-smtp') {
|
||||
if (result.relay.username === result.relay.password) result.relay.username = constants.SECRET_PLACEHOLDER;
|
||||
result.relay.password = constants.SECRET_PLACEHOLDER;
|
||||
@@ -1132,7 +1132,7 @@ async function updateList(name, domain, data, auditSource) {
|
||||
|
||||
name = name.toLowerCase();
|
||||
|
||||
let error = validateName(name);
|
||||
const error = validateName(name);
|
||||
if (error) throw error;
|
||||
|
||||
for (let i = 0; i < members.length; i++) {
|
||||
@@ -1169,7 +1169,8 @@ async function resolveList(listName, listDomain) {
|
||||
const list = await getList(listName, listDomain);
|
||||
if (!list) throw new BoxError(BoxError.NOT_FOUND, 'List not found');
|
||||
|
||||
let resolvedMembers = [], toResolve = list.members.slice(), visited = []; // slice creates a copy of array
|
||||
const resolvedMembers = [], visited = []; // slice creates a copy of array
|
||||
let toResolve = list.members.slice();
|
||||
|
||||
while (toResolve.length != 0) {
|
||||
const toProcess = toResolve.shift();
|
||||
|
||||
Reference in New Issue
Block a user