forked from Mirrors/keyoxide-web
fix: URL query validation
This commit is contained in:
parent
e0d47e5247
commit
ee55c50a1a
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ router.get('/aspe', query('aspeUri').isString(), (req, res) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// OpenPGP route
|
// OpenPGP route
|
||||||
router.get('/openpgp', query('url').isFQDN(), query('protocol').isString(), (req, res) => {
|
router.get('/openpgp', query('url').isURL(), query('protocol').isString(), (req, res) => {
|
||||||
const errors = validationResult(req)
|
const errors = validationResult(req)
|
||||||
if (!errors.isEmpty()) {
|
if (!errors.isEmpty()) {
|
||||||
return res.status(400).json({ errors: errors.array() })
|
return res.status(400).json({ errors: errors.array() })
|
||||||
|
|
Loading…
Reference in a new issue