chore: simplify honeycomb alerts (#26142)
This commit is contained in:
parent
293bb422fa
commit
f8aa4a3be0
15 changed files with 185 additions and 408 deletions
8
packages/console/core/src/util/crypto.ts
Normal file
8
packages/console/core/src/util/crypto.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { timingSafeEqual } from "node:crypto"
|
||||
|
||||
export function safeEqual(a: string, b: string): boolean {
|
||||
const encoder = new TextEncoder()
|
||||
const aBytes = encoder.encode(a)
|
||||
const bBytes = encoder.encode(b)
|
||||
return aBytes.length === bBytes.length && timingSafeEqual(aBytes, bBytes)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue