开发者

Validation of Facebook Badge in Rails form

I would like users of my Rails application to be able to submit their Facebook Badge as input in a form, but I absolutely want to to verify that what they 开发者_Python百科provide is a valid Badge, not something that may compromise the security of my system (Javascript ...).

Is there a good way to validate a form field that contains a Facebook Badge?


I'm not sure if you could safely develop something that would validate badges. By "safely" I mean something that wouldn't generate false negatives (or false positives) if/when Facebook happens to change their implementation of badges (as they are wont to do with many parts of their platform).

What you can do is use something like HTML Purifier to ensure that the input doesn't contain malicious tags.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜