skip compare altogether

This commit is contained in:
einhornimmond 2025-10-14 11:04:12 +02:00
parent 0ce9eaab3d
commit c0a60f4ca6
4 changed files with 12 additions and 10 deletions

View File

@ -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(

View File

@ -35,7 +35,7 @@ async function main() {
} else {
const endTime = new Date()
const duration = endTime.getTime() - startTime.getTime()
printServerCrashAsciiArt(logger, `reason: ${reason}`, `duration: ${duration}ms`, '')
printServerCrashAsciiArt(`reason: ${reason}`, `duration: ${duration}ms`, '')
logger.error(error)
}
})

View File

@ -34,9 +34,10 @@
},
"dependencies": {
"decimal.js-light": "^2.5.1",
"esbuild": "^0.25.2",
"esbuild": "^0.25.2",
"jose": "^4.14.4",
"log4js": "^6.9.1",
"yoctocolors-cjs": "^2.1.2",
"zod": "^3.25.61"
},
"engines": {

View File

@ -1,4 +1,5 @@
import { Logger } from "log4js"
import { Logger } from 'log4js'
import colors from 'yoctocolors-cjs'
export enum ShutdownReason {
SIGINT = 'SIGINT',
@ -42,9 +43,9 @@ export function onShutdown(shutdownHandler: (reason: ShutdownReason, error?: Err
}
}
export function printServerCrashAsciiArt(logger: Logger, msg1: string, msg2: string, msg3: string) {
logger.error(` /\\_/\\ ${msg1}`)
logger.error(`( x.x ) ${msg2}`)
logger.error(`> < ${msg3}`)
logger.error('')
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(''))
}