salesforce / secure-filters

Anti-XSS Security Filters for EJS and More
BSD 3-Clause "New" or "Revised" License
139 stars 39 forks source link

Aggressive jsObj escaping #27

Open stash opened 10 years ago

stash commented 10 years ago

Previously, we had the punctuation characters ",-.:[\]_{} allowed in the jsObj filter. This was mostly so the built-in JSON.stringify could be used without a replacer parameter for speed. However, this potentially allows for hijinx and other nonsense. This patch reduces the allowed punctuation to just ,.-_, which is the same as for the js filter.