mytakedotorg/mtdo

Harden against "typosquatting"

开放

#136 创建于 2017年12月28日

 (0 条评论) (0 个反应) (0 位负责人)Java (3 个派生)auto 404
good first issuesecurity/abuse

仓库指标

星标
 (16 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Add a username_typosquat field to the account table, which contains the username with all punctuation removed. Enforce uniqueness on this field. This ensures that if I am Alexander Hamilton, and I claim the alexanderhamilton username, nobody can pseudo-snipe me by grabbing alexander-hamilton. Might want to also harden against a1exanderhamilton by replacing 1 with l for the typosquat field. I don't think we need to worry about 0 and O, because we enforce usernames to be all-lowercase, hard to confuse 0 and o.

Brought to my attention by http://blog.npmjs.org/post/168978377570/new-package-moniker-rules?utm_content=buffer646e8&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

贡献者指南