Forráskód Böngészése

companion: add todo

Ifedapo Olarewaju 6 éve
szülő
commit
df5e8ed8d3

+ 1 - 0
packages/@uppy/companion/src/server/controllers/send-token.js

@@ -29,6 +29,7 @@ module.exports = function sendToken (req, res, next) {
     const allowedClients = req.uppy.options.clients
     const allowedClients = req.uppy.options.clients
     // if no preset clients then allow any client
     // if no preset clients then allow any client
     if (!allowedClients || hasMatch(origin, allowedClients) || hasMatch(parseUrl(origin).host, allowedClients)) {
     if (!allowedClients || hasMatch(origin, allowedClients) || hasMatch(parseUrl(origin).host, allowedClients)) {
+      // @todo do a more secure client version check, see https://www.npmjs.com/package/semver
       return res.send(clientVersion ? htmlContent(uppyAuthToken, origin) : oldHtmlContent(uppyAuthToken, origin))
       return res.send(clientVersion ? htmlContent(uppyAuthToken, origin) : oldHtmlContent(uppyAuthToken, origin))
     }
     }
   }
   }