Remove legacy encryption fallback code
This commit is contained in:
parent
7b1e7ae97a
commit
281c7f7ac2
2 changed files with 24 additions and 27 deletions
|
|
@ -218,8 +218,7 @@ module.exports = async (
|
||||||
try {
|
try {
|
||||||
if (
|
if (
|
||||||
nonEncryptedRoutes.includes(req.path) ||
|
nonEncryptedRoutes.includes(req.path) ||
|
||||||
process.env.DISABLE_SHOCK_ENCRYPTION === 'true' ||
|
process.env.DISABLE_SHOCK_ENCRYPTION === 'true'
|
||||||
!deviceId
|
|
||||||
) {
|
) {
|
||||||
return next()
|
return next()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,6 @@ const server = program => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deviceId) {
|
|
||||||
res.send = (...args) => {
|
res.send = (...args) => {
|
||||||
if (args[0] && args[0].ciphertext && args[0].iv) {
|
if (args[0] && args[0].ciphertext && args[0].iv) {
|
||||||
logger.warn('Response loop detected!')
|
logger.warn('Response loop detected!')
|
||||||
|
|
@ -161,7 +160,6 @@ const server = program => {
|
||||||
oldSend.apply(res, args)
|
oldSend.apply(res, args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue