[BUG] 分号不当地作为查询参数的分隔符(从而产生解析器差异)
作者: jub0bs创建于 2025年3月17日更新于 2026年7月24日
标签bug
Although splitting query-param pairs on both ampersands and semicolons is harmless in isolation, it creates interoperability issues when gorilla/mux is used in conjunction with other tools that only split query-param pairs on ampersands (and not on semicolons). Such a parser differential can indeed open the door to security vulnerabilities, such as Web cache poisoning (via query-parameter cloaking) and broken access control.
Broken access control, in particular, is a real risk for programmes that rely on both net/url and mux.Vars for parsing the query string; you may believe that such programmes are rare, but take a look at the Minio project, which does rely on such a mix. For instance, consider the simple server below:
内容来源: gorilla/mux