XSSとしてカウントされるかどうかはわかりませんが、エラーが発生しています
image_tag があり、:alt
タグはユーザーによって生成されます
ただし、sanitize
/ h
/を使用html_escape
してもこれは役に立ちません (OWASP- hereから)
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";
alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--
></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
するとき
:alt => (the string above)
画像の出力がめちゃくちゃです
この XSS を修正する方法はありますか?
私は最新のレール、ルビーを使用しています