Skip to content

Commit

Permalink
Blacklist noncev2 namespace in v1 set
Browse files Browse the repository at this point in the history
  • Loading branch information
phuctm97 committed Oct 1, 2021
1 parent d7a4610 commit 1e71c18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routes/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ router.post(
set_data: { data },
tableName,
} = req.body;

if (namespace === "noncev2") {
return res.status(400).json({ error: "noncev2 namespace is not allowed to be set", success: false });
}

const key = constructKey(pubKeyX, pubKeyY, namespace);
await knexWrite(tableName).insert({
key,
Expand Down

0 comments on commit 1e71c18

Please sign in to comment.