vue-cli紧急更新!桌面出现 WITH-LOVE-FROM-AMERICA.txt

1,574 阅读2分钟

发文时间:2022-03-16 09:54

截止到发文时间vue-cli已经发布5.0.3修复该问题

插曲:掘金出了BUG,文章一直没审核,当你看到文章的时候,已经是旧闻了 😩

“安全了,over”

【以反战为名,百万周下载量node-ipc包作者进行供应链投毒】

在公众号里看过这篇的朋友,跟我说的是一回事 ps:被抢先了 🙃

image.png

问题

npm install构建项目后,桌面突然多了一个WITH-LOVE-FROM-AMERICA.txt

image.png

文件里面是空内容

image.png

可达鸭眉头一皱,觉得事情没有那么简单

全局搜索WITH-LOVE-FROM-AMERICA.txt后发现一个包【peacenotwar】

image.png

打开文件是各种语言的反战宣言

War is not the answer, no matter how bad it is. War brings tragedy and destruction, robbing generations of precious moments and hope for the future. 
The goal should always be peace.

The soldier puts on their boots for their country, obeying the orders of their government. 
Find the strength to forgive, come together, and stand up to real injustice and evil.

We are all connected through humanity and only separated because of geographic lines. 
We may feel insignificant as individuals but when enough people act with the same intention, we create big movements.

Do what you think is right, follow your own morals.

May God bless you and your family. Stay safe.

image.png

看到这里,我...

image.png

详细文件可以去peacenotwar的github上看

👉peacenotwar的github

解决

搜索一下,果然不是我一个人中招。在V2EX上看到了问题的来龙去脉

最新解决办法

vue-cli 升级到 5.0.3以上

搬运一下解决方式

  • 按照readme正常install
  • 构建结束后,用编辑器全局搜索'peacenotwar',将其全部删除
  • 然后项目的node_models目录下,将'peacenotwar'目录删除
  • '项目/node_modules/node-ipc/node-ipc.js'这个文件中引用'peacenotwar'的代码注释掉
  • 然后正常启动项目,就可以了。

👉原文

原因

vue-cli 引用了node-ipc 👈ps: 坏人就是他!

node-ipc 引用了 peacenotwar

node-ipc的github上标注了从新版开始引用peacenotwar,一下引起了社区的讨论

as of v11.0.0 & v9.2.2 this module uses the peacenotwar module.

image.png

👉node-ipc issues#233

issues中还提到了“如果机器地址是俄罗斯,会把文件成♥”

不过现在看不到了

在vue-cli的issues上也有人反馈

👉vue-cli issues#7054

同时vue-cli也紧急发布了新版本修复

image.png

最后

image.png

中招的抓紧解决!!!

👀 “来自美国的爱” 还是算了吧