diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-06-04 03:17:10 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-06-04 03:17:10 +0300 |
commit | b35833cadff3a4e9346cb97ae3628f6c5b4e6bf9 (patch) | |
tree | 6e5d432035f193fb7f548c0be2d50d1642d96c0d /api/routes/getZblock/index.js | |
parent | 28a34e20d81b7948d88e190517198174822726a4 (diff) | |
download | arching-kaos-tools-b35833cadff3a4e9346cb97ae3628f6c5b4e6bf9.tar.gz arching-kaos-tools-b35833cadff3a4e9346cb97ae3628f6c5b4e6bf9.tar.bz2 arching-kaos-tools-b35833cadff3a4e9346cb97ae3628f6c5b4e6bf9.zip |
Extra validation
Diffstat (limited to 'api/routes/getZblock/index.js')
-rw-r--r-- | api/routes/getZblock/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/routes/getZblock/index.js b/api/routes/getZblock/index.js index 723df48..57acae1 100644 --- a/api/routes/getZblock/index.js +++ b/api/routes/getZblock/index.js @@ -51,7 +51,7 @@ function fetchZblock(zblock, res){ module.exports = (req, res) => { console.log(req.params) - if ( (req.params.zblock) && req.params.zblock.length === 46 ){ + if ( (req.params.zblock) && typeof req.params.zblock === "string" && req.params.zblock.length === 46 ){ regex= /Qm[A-Za-z0-9]{44}/; if (regex.test(req.params.zblock)){ if (req.params.zblock === "QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH" ){ |