fastify-file-upload icon indicating copy to clipboard operation
fastify-file-upload copied to clipboard

在 Content-Length 和文件不一致时会引起程序崩溃 Cannot read property 'originalUrl' of null

Open zhongshan1993 opened this issue 4 years ago • 0 comments

复现 demo https://github.com/zhongshan1993/fastify-file-error-demo

在 触发 busboy 的 error 事件后,又触发了 finish 事件,导致 middie 中的 done 方法再次被调用,此时 req 的值为 null。

这种场景下,live 环境易收到外部攻击

image

zhongshan1993 avatar Nov 17 '20 09:11 zhongshan1993