专栏名称: 创宇前端
目录
相关文章推荐
前端早读课  ·  【第3520期】Slack、Notion ... ·  15 小时前  
前端早读课  ·  【图书】MCP原理与实战:高效AI ... ·  15 小时前  
脚本之家  ·  大厂都在用的 12 大主流 AI ... ·  昨天  
脚本之家  ·  大厂都在用的 12 大主流 AI ... ·  昨天  
51好读  ›  专栏  ›  创宇前端

每个 node 应用可能存在的 timing-attack 安全漏洞

创宇前端  · 掘金  · 前端  · 2018-02-28 01:41

正文

请到「今天看啥」查看全文


RegExp ( '^' + keywords + '$' , 'im' ); function containsKeyword ( node ) { if (node.type === 'Identifier' ) { if (re.test(node.name)) return true ; } return } if (node.test.operator === '==' || node.test.operator === '===' || node.test.operator === '!=' || node.test.operator === '!==' ) { // 在这里 console 出错误 }

首先这个插件会判断本次的运算符是否为 ==、===、!=、!== 其中一种,其次检查标识符(字段名)是否包含特殊字符串 password、secret、api、apiKey、token、auth、pass、hash ,如果同时满足二者情况,eslint 就会编译报错 Potential timing attack







请到「今天看啥」查看全文