Merge pull request #686 from cloudron-io/send_crash

Fix crash in res.send()
This commit is contained in:
James Sumners 2020-12-02 20:48:53 -05:00 committed by GitHub
commit 582cd2bb28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ SearchResponse.prototype.send = function (entry, nofiltering) {
const self = this
const savedAttrs = {}
const save = null
let save = null
if (entry instanceof SearchEntry || entry instanceof SearchReference) {
if (!entry.messageID) { entry.messageID = this.messageID }
if (entry.messageID !== this.messageID) { throw new Error('SearchEntry messageID mismatch') }
@ -66,7 +66,7 @@ SearchResponse.prototype.send = function (entry, nofiltering) {
}
})
const save = entry
save = entry
entry = new SearchEntry({
objectName: typeof (save.dn) === 'string' ? parseDN(save.dn) : save.dn,
messageID: self.messageID,