Sparetire

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

  •  
  •   Sparetire · Jul 27, 2016 · 4694 views
    This topic created in 3767 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   ·   2462 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 12:34 · PVG 20:34 · LAX 04:34 · JFK 07:34
    ♥ Do have faith in what you're doing.