Target | News |
Subject | anti-XSS system (4) |
Summary | This is the last chapter of BigUmbrella.The code in (3) has two points should be argued.- Is the check pattern OK?preg_match( '/[<\'"].{15}/s' , $val , $regs )<img src="(REQUEST)" /><a href="(REQUEST)">If this pattern exists, it is not enough.Because "... |
安易にprototype.jsなんかをincludeしてしまうと、このフィルタリングが非常に難しい・・・。たとえば、Ajaxは new Ajax.Request で生成されてしまう・・・。
外部ライブラリ自体の脆弱性ではないけど、それが引き起こす脆弱性が増えそうですね。
便利さと完全にトレードオフです。困ったものです・・。
実際、CSRF対策は
・とりあえずチケット
・後は何とかどっかで引っかかってくれ
という状況で。