3 var mongoUtils = require('gitter-web-persistence-utils/lib/mongo-utils');
6 * Fixes bad links, like when a browser sends this though
7 * /PrismarineJS/node-minecraft-protocol?at=54ea6fcecadb3f7525792ba9)I
9 function fixMongoIdQueryParam(value) {
13 if (value.length > 24) {
14 value = value.substring(0, 24);
17 if (!mongoUtils.isLikeObjectId(value)) return;
22 module.exports = fixMongoIdQueryParam;