Improved security on PA routines
This commit is contained in:
parent
b755d756d5
commit
572389aab7
|
@ -106,10 +106,11 @@ async function updateUserIdMappings() {
|
|||
tags: ['paloalto', 'user-id'],
|
||||
message: `Erro atualizando user-id mappings em ${
|
||||
pAHost.description || pAHost.cidr
|
||||
}: ${e.message}`,
|
||||
data: e
|
||||
}: ${e.message}`
|
||||
})
|
||||
|
||||
console.log(e) // Do not add e to log DB for security reasons...
|
||||
|
||||
return 'Não foi possível atualizar. Veja o log do servidor'
|
||||
} finally {
|
||||
const index = isWorking.indexOf(pAHost.id)
|
||||
|
|
|
@ -4,10 +4,10 @@ import prisma from '../prisma'
|
|||
const PAHost = {
|
||||
key: parent => {
|
||||
const decryptedKey = decryptKey(parent.encryptedKey)
|
||||
return `${decryptedKey.slice(0, 3)}*****${decryptedKey.slice(
|
||||
decryptedKey.length - 4,
|
||||
decryptedKey.length
|
||||
)}`
|
||||
return `***${decryptedKey.slice(5, 8)}***${decryptedKey.slice(
|
||||
decryptedKey.length - 8,
|
||||
decryptedKey.length - 5
|
||||
)}***`
|
||||
},
|
||||
owner: parent => prisma.user.findUnique({ where: { id: parent.ownerId } })
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user