为什么 URL http://a/%%30%30 会崩溃 Google Chrome?

Why does the URL http://a/%%30%30 crash Google Chrome?

URL http://a/%%30%30 崩溃 Google Chrome,即使只是将鼠标悬停在它上面。

为什么会这样?

Tom Scott 在 his YouTube video 中对此进行了解释:

  1. http://a/%%30%30 被解码为 http://a/%00 因为 %300
  2. http://a/%00 然后被另一段代码进一步解码为 http://a/<NULL> 因为 %00 是 NULL 字符

错误是 originally demonstrated by Andris Atteka,他只是在字符串中添加了一个空字符。