1
0
mirror of https://github.com/GOSTSec/gostexplr synced 2025-01-29 16:04:32 +00:00

Slice extra -000 in search string

This commit is contained in:
xcps 2018-02-04 00:00:43 +05:00
parent 8fc53880a2
commit c4e33e0f6f

View File

@ -5,7 +5,10 @@ var router = express.Router();
/* GET home page. */
router.post('/', async function(req, res, next) {
const search = encodeURI(req.body.search);
let search = encodeURI(req.body.search).trim();
if (search.endsWith('-000')) {
search = search.slice(0, -4);
}
// looking for address
const address = await models.Address.findOne({