ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.58k stars 1.33k forks source link

Update to formidable ^3.2.1 #1679

Closed guimard closed 2 years ago

guimard commented 2 years ago

Hi,

when trying to use formidable 3.2.1, tests passed except:

  320 passing (9s)
  5 pending
  7 failing

  1) Multipart
       #field(name, value)
         should set a multipart field value:
     AssertionError: expected Array [ 'tobi' ] to be 'tobi'
      at Assertion.fail (/usr/share/nodejs/should/cjs/should.js:281:17)
      at Assertion.value (/usr/share/nodejs/should/cjs/should.js:362:19)
      at /tmp/autopkgtest.4JRX27/autopkgtest_tmp/smokevEojgS/test/node/multipart.js:32:39
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

  2) Multipart
       #field(name, value)
         should work with file attachments:
     AssertionError: expected Array [ 'Tobi' ] to be 'Tobi'
      at Assertion.fail (/usr/share/nodejs/should/cjs/should.js:281:17)
      at Assertion.value (/usr/share/nodejs/should/cjs/should.js:362:19)
      at /tmp/autopkgtest.4JRX27/autopkgtest_tmp/smokevEojgS/test/node/multipart.js:46:30
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

  3) Multipart
       #attach(name, path)
         should attach a file:
     TypeError: Cannot read property 'should' of undefined
      at /tmp/autopkgtest.4JRX27/autopkgtest_tmp/smokevEojgS/test/node/multipart.js:70:31
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

  4) Multipart
       #attach(name, path, filename)
         should use the custom filename:
     TypeError: Cannot read property 'should' of undefined
      at /tmp/autopkgtest.4JRX27/autopkgtest_tmp/smokevEojgS/test/node/multipart.js:145:33
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

  5) Multipart
       #attach(name, path, filename)
         should fire progress event:
     Uncaught TypeError: Cannot read property 'should' of undefined
      at /tmp/autopkgtest.4JRX27/autopkgtest_tmp/smokevEojgS/test/node/multipart.js:166:33
      at Request.callback (/usr/share/nodejs/superagent/lib/node/index.js:890:12)
      at /usr/share/nodejs/superagent/lib/node/index.js:1122:18
      at zalgoSafe (/usr/share/nodejs/dezalgo/dezalgo.js:20:10)
      at f (/usr/share/nodejs/once/once.js:25:25)
      at IncomingForm.<anonymous> (/usr/share/nodejs/formidable/cjs/Formidable.js:227:11)
      at IncomingForm._maybeEnd (/usr/share/nodejs/formidable/cjs/Formidable.js:634:12)
      at /usr/share/nodejs/formidable/cjs/Formidable.js:413:18
      at WriteStream.<anonymous> (/usr/share/nodejs/formidable/cjs/PersistentFile.js:143:9)
      at finishMaybe (_stream_writable.js:639:14)
      at _stream_writable.js:616:5
      at WriteStream._final (internal/fs/streams.js:352:3)
      at callFinal (_stream_writable.js:609:10)
      at processTicksAndRejections (internal/process/task_queues.js:84:21)

  6) Multipart
       #field(name, val)
         should set a multipart field value:
     Uncaught AssertionError: expected Array [ 'foo' ] to be 'foo'
      at Assertion.fail (/usr/share/nodejs/should/cjs/should.js:281:17)
      at Assertion.value (/usr/share/nodejs/should/cjs/should.js:362:19)
      at /tmp/autopkgtest.4JRX27/autopkgtest_tmp/smokevEojgS/test/node/multipart.js:197:41
      at Request.callback (/usr/share/nodejs/superagent/lib/node/index.js:890:12)
      at /usr/share/nodejs/superagent/lib/node/index.js:1122:18
      at /usr/share/nodejs/dezalgo/dezalgo.js:17:12
      at RawTask.call (/usr/share/nodejs/asap/asap.js:40:19)
      at flush (/usr/share/nodejs/asap/raw.js:50:29)
      at processTicksAndRejections (internal/process/task_queues.js:79:11)

  7) Multipart
       #field(object)
         should set multiple multipart fields:
     Uncaught AssertionError: expected Array [ 'foo' ] to be 'foo'
      at Assertion.fail (/usr/share/nodejs/should/cjs/should.js:281:17)
      at Assertion.value (/usr/share/nodejs/should/cjs/should.js:362:19)
      at /tmp/autopkgtest.4JRX27/autopkgtest_tmp/smokevEojgS/test/node/multipart.js:212:41
      at Request.callback (/usr/share/nodejs/superagent/lib/node/index.js:890:12)
      at /usr/share/nodejs/superagent/lib/node/index.js:1122:18
      at /usr/share/nodejs/dezalgo/dezalgo.js:17:12
      at RawTask.call (/usr/share/nodejs/asap/asap.js:40:19)
      at flush (/usr/share/nodejs/asap/raw.js:50:29)
      at processTicksAndRejections (internal/process/task_queues.js:79:11)
darakeon commented 2 years ago

There is a vulnerability in the older version. Can this be updated?

https://nvd.nist.gov/vuln/detail/CVE-2022-29622

titanism commented 2 years ago

This is not a vulnerability. It was a false CVE.

See https://github.com/visionmedia/superagent/issues/1725 and related discussions. We are waiting for CVE to be removed or downgraded.