mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix crash log, uncomment code which may lead to crash
This commit is contained in:
parent
c0a60f4ca6
commit
b7f34ace84
@ -159,11 +159,11 @@ export class AuthenticationResolver {
|
||||
const authComPublicKey = new Ed25519PublicKey(authCom.publicKey)
|
||||
methodLogger.debug('authCom.publicKey', authComPublicKey.asHex())
|
||||
methodLogger.debug('args.publicKey', argsPublicKey.asHex())
|
||||
/*if (!authComPublicKey.isSame(argsPublicKey)) {
|
||||
if (!authComPublicKey.isSame(argsPublicKey)) {
|
||||
throw new Error(
|
||||
`corrupt authentication call detected, oneTimeCode: ${authArgs.oneTimeCode} doesn't belong to caller: ${argsPublicKey.asHex()}`
|
||||
)
|
||||
}*/
|
||||
}
|
||||
const communityUuid = uuidv4Schema.safeParse(authArgs.uuid)
|
||||
if (!communityUuid.success) {
|
||||
throw new Error(
|
||||
@ -174,7 +174,7 @@ export class AuthenticationResolver {
|
||||
// need to use query builder, loading from db, changing and save lead to server crash with this error:
|
||||
// TypeError [ERR_INVALID_ARG_TYPE]: The "otherBuffer" argument must be of type Buffer or Uint8Array. Received an instance of Object
|
||||
// seems to be a typeorm problem with Buffer, even if I give a freshly created Buffer for public_key
|
||||
await DbCommunity.createQueryBuilder()
|
||||
/*await DbCommunity.createQueryBuilder()
|
||||
.update(DbCommunity)
|
||||
.set({
|
||||
communityUuid: communityUuid.data,
|
||||
@ -183,7 +183,8 @@ export class AuthenticationResolver {
|
||||
.where({ id: authCom.id })
|
||||
.execute()
|
||||
methodLogger.debug('update authCom.uuid successfully')
|
||||
|
||||
*/
|
||||
methodLogger.debug('skipped community update')
|
||||
const homeComB = await getHomeCommunity()
|
||||
if (homeComB?.communityUuid) {
|
||||
const responseArgs = new AuthenticationResponseJwtPayloadType(args.handshakeID,homeComB.communityUuid)
|
||||
|
||||
@ -35,7 +35,7 @@ async function main() {
|
||||
} else {
|
||||
const endTime = new Date()
|
||||
const duration = endTime.getTime() - startTime.getTime()
|
||||
printServerCrashAsciiArt(`reason: ${reason}`, `duration: ${duration}ms`, '')
|
||||
printServerCrashAsciiArt('Server Crash', `reason: ${reason}`, `duration: ${duration}ms`)
|
||||
logger.error(error)
|
||||
}
|
||||
})
|
||||
|
||||
@ -46,6 +46,6 @@ export function onShutdown(shutdownHandler: (reason: ShutdownReason, error?: Err
|
||||
export function printServerCrashAsciiArt(msg1: string, msg2: string, msg3: string) {
|
||||
console.error(colors.redBright(` /\\_/\\ ${msg1}`))
|
||||
console.error(colors.redBright(`( x.x ) ${msg2}`))
|
||||
console.error(colors.redBright(`> < ${msg3}`))
|
||||
console.error(colors.redBright(` > < ${msg3}`))
|
||||
console.error(colors.redBright(''))
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user