Best regex to catch XSS (Cross-site Scripting) attack (in Java)?

后端 未结 9 1898
南方客
南方客 2020-12-02 08:49

Jeff actually posted about this in Sanitize HTML. But his example is in C# and I\'m actually more interested in a Java version. Does anyone have a better version for Java? I

9条回答
  •  孤街浪徒
    2020-12-02 09:25

    An old thread but maybe this will be useful for other users. There is a maintained security layer tool for php: https://github.com/PHPIDS/ It is based on a set of regex which you can find here:

    https://github.com/PHPIDS/PHPIDS/blob/master/lib/IDS/default_filter.xml

提交回复
热议问题