Browse Source

companion: validate url for truthy value (#2484)

Ifedapo .A. Olarewaju 4 years ago
parent
commit
063c015539
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/@uppy/companion/src/server/controllers/url.js

+ 4 - 0
packages/@uppy/companion/src/server/controllers/url.js

@@ -84,6 +84,10 @@ const get = (req, res) => {
  * @param {boolean} debug whether the server is running in debug mode
  */
 const validateURL = (url, debug) => {
+  if (!url) {
+    return false
+  }
+
   const validURLOpts = {
     protocols: ['http', 'https'],
     require_protocol: true,