This commit is contained in:
Manav Rathi
2024-07-02 21:15:02 +05:30
parent eee9a32b9a
commit 2709298df0
3 changed files with 9 additions and 13 deletions

View File

@@ -1,13 +1,14 @@
{
"extends": "@/build-config/tsconfig-next.json",
"compilerOptions": {
/* Set the base directory from which to resolve bare module names */
/* Set the base directory from which to resolve bare module names. */
"baseUrl": "./src",
/* MUI doesn't work with exactOptionalPropertyTypes yet. */
"exactOptionalPropertyTypes": false
},
"include": [
"src",
"next-env.d.ts",
"../../packages/next/global-electron.d.ts",
"../../packages/shared/themes/mui-theme.d.ts"
]

View File

@@ -31,12 +31,12 @@ export class Steam {
const digest = sha1HMACDigest(this.secret.buffer, uintToArray(counter));
// Same calculation as regular HOTP.
const offset = digest[digest.length - 1] & 15;
const offset = digest[digest.length - 1]! & 15;
let otp =
((digest[offset] & 127) << 24) |
((digest[offset + 1] & 255) << 16) |
((digest[offset + 2] & 255) << 8) |
(digest[offset + 3] & 255);
((digest[offset]! & 127) << 24) |
((digest[offset + 1]! & 255) << 16) |
((digest[offset + 2]! & 255) << 8) |
(digest[offset + 3]! & 255);
// However, instead of using this as the OTP, use it to index into
// the steam OTP alphabet.

View File

@@ -1,14 +1,9 @@
{
"extends": "@/build-config/tsconfig-next.json",
"compilerOptions": {
/* Set the base directory from which to resolve bare module names */
/* Set the base directory from which to resolve bare module names. */
"baseUrl": "./src",
/* This is hard to enforce in certain cases where we do a lot of array
indexing, e.g. image/ML ops, and TS doesn't currently have a way to
disable this for blocks of code. */
"noUncheckedIndexedAccess": false,
/* MUI doesn't play great with exactOptionalPropertyTypes currently. */
/* MUI doesn't work with exactOptionalPropertyTypes yet. */
"exactOptionalPropertyTypes": false
},
"include": [