mirror of
https://github.com/tornadocash/trusted-setup-server.git
synced 2024-11-24 19:05:30 +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) {
|
function restrictSymbols(value) {
|
||||||
|
if (value) {
|
||||||
const regExpression = new RegExp('[^0-9a-zA-Z\\x20]', 'g')
|
const regExpression = new RegExp('[^0-9a-zA-Z\\x20]', 'g')
|
||||||
return value.replace(regExpression, '')
|
return value.toString().replace(regExpression, '')
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
router.get('/connect/:provider', validateProvider, validateRefferer, (req, res) => {
|
router.get('/connect/:provider', validateProvider, validateRefferer, (req, res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user