Skip to content

Commit

Permalink
refactor(RelayServe): signature validation
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscotobar committed Sep 1, 2024
1 parent 7dc1125 commit 1e3df15
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 35 deletions.
125 changes: 95 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions src/RelayServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,7 @@ export class RelayServer extends EventEmitter {
requestMinValidSeconds
);

// TODO: one of the 2 checks may be unnecessary
if (
signature === SERVER_SIGNATURE_REQUIRED ||
[undefined, ''].includes(signature)
) {
if (signature === SERVER_SIGNATURE_REQUIRED) {
throw new Error(
'Unacceptable signature: it must be required and provided by the client'
);
Expand Down

0 comments on commit 1e3df15

Please sign in to comment.