Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ilya Vysotski
Koa Shopify Auth
Commits
9267d45b
Commit
9267d45b
authored
Oct 01, 2020
by
Anthony Morris
Browse files
Remove redundant comparison
parent
7b28baf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/auth/safe-compare.ts
View file @
9267d45b
...
...
@@ -15,5 +15,5 @@ export default function safeCompare(stringA: string, stringB: string) {
const
buffB
=
Buffer
.
alloc
(
bLen
,
0
,
'
utf8
'
);
buffB
.
write
(
stringB
);
return
crypto
.
timingSafeEqual
(
buffA
,
buffB
)
&&
aLen
===
bLen
;
return
crypto
.
timingSafeEqual
(
buffA
,
buffB
);
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment