gpt4 book ai didi

node.js - Azure DevOps 扩展中的 Node Cipheriv 警告 - 发布任务

转载 作者:搜寻专家 更新时间:2023-10-31 23:39:42 24 4
gpt4 key购买 nike

我正在从事一个开发 Azure DevOps 发布任务扩展的项目。最近,当发布任务运行时,我在日志中多次打印此警告消息 - “警告:将 Cipheriv 用于 aes-256-ctr 的计数器模式”。

我没有早点得到它。当我开始收到这个错误时,我只更改了一些 console.log(..),甚至没有更改任何可能触发此错误的代码。 (可能是一些 npm 依赖更新!)

关于为什么我会收到此错误以及如何修复它的任何想法!如果没有,如何禁用它?

附言- 我知道这个问题已经被问到并且可能被归类为重复问题。但我在 Azure DevOps 发布任务的上下文中询问,其他是独立的 node.js 项目。而且,这些修复对我不起作用。

最佳答案

这与 Azure-Pipelines-Task-Lib 和 Azure-Pipelines-agent 相关,不受您的控制。问题应该在这些项目或其依赖项中得到解决。

由于这些都随代理安装程序和任务本身一起提供,因此这不在您的直接控制之下。

这可能是由于代理对 Node 6 的依赖性造成的。在代理上支持 Node 10 LTS 的工作正在进行中( Node 10 现在在代理安装程序中并排提供)。

Azure-Pipelines-Agent calls the wrong method here .

    let encryptKey = crypto.randomBytes(256);
let cipher = crypto.createCipher("aes-256-ctr", encryptKey);
let encryptedContent = cipher.update(secret, "utf8", "hex");
encryptedContent += cipher.final("hex");

据我所知,在 Node 8 或更高版本上运行时,它应该调用 crypto.createCipheriv() 而不是 crypto.createCipher()Azure-Pipelines-Task-Lib seems to rely on the same piece of code .

looks like 2.8.0 of the Azure-Pipelines-Task-Lib fixes this .它现在在 npm 上,所以升级以使这些警告消失。

关于node.js - Azure DevOps 扩展中的 Node Cipheriv 警告 - 发布任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55091341/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com