mirror of
https://github.com/tornadocash/trusted-setup-server.git
synced 2024-12-22 01:03:16 +01:00
fix restrictSymbols
This commit is contained in:
parent
8e7c2df8b3
commit
525c237b6c
@ -63,8 +63,12 @@ function validateRefferer(req, res, next) {
|
||||
}
|
||||
|
||||
function restrictSymbols(value) {
|
||||
const regExpression = new RegExp('[^0-9a-zA-Z\\x20]', 'g')
|
||||
return value.replace(regExpression, '')
|
||||
if (value) {
|
||||
const regExpression = new RegExp('[^0-9a-zA-Z\\x20]', 'g')
|
||||
return value.toString().replace(regExpression, '')
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
router.get('/connect/:provider', validateProvider, validateRefferer, (req, res) => {
|
||||
|
Loading…
Reference in New Issue
Block a user