Sparetire

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

  •  
  •   Sparetire · Jul 27, 2016 · 4351 views
    This topic created in 3586 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
        1
    onice  
       Aug 3, 2016
    做白名单,只允许 markdown 相关的标签。不过可能降低易用性。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5619 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 03:36 · PVG 11:36 · LAX 20:36 · JFK 23:36
    ♥ Do have faith in what you're doing.