Sparetire

Markdown 会导致 XSS 吗以及要怎么过滤呢?

  •  
  •   Sparetire · Jul 27, 2016 · 4689 views
    This topic created in 3765 days ago, the information mentioned may be changed or developed.

    想给博客撸个 markdown 编辑器,直觉上感觉这东西很容易导致 XSS 啊,那么如果会导致 XSS 的话要怎么过滤呢?或者说需要做哪些安全措施?感觉能 X 的地方也很多。。

    1 replies  •  2016-08-03 18:29:30 +08:00
    onice
    onice
    Aug 3, 2016
    1
    做白名单,只允许 markdown 相关的标签。不过可能降低易用性。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4377 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 09:06 · PVG 17:06 · LAX 01:06 · JFK 04:06
    ♥ Do have faith in what you're doing.