Whitelist

Component ID

747504

Component name

Whitelist

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

547

Component created

Component changed

Component body

The whitelist input filter disables HTML forms whose domains are not part of an approved whitelist. It works by stripping out the "action" attribute for all forms which are not on the whitelist. For example, you could use this to enable all forms that submit to http://www.good-site.com while disabling forms that submit to http://www.evil-site.com or other suspicious destinations.

I wrote this module to solve a specific need on my website. It could be generalized to support whitelisting of other HTML in addition to forms, such as hyperlinks and images. Another enhancement worth considering would be the ability to blacklist domains rather than whitelisting domains. Maybe I'll eventually get around to adding those features, but for now this just does forms.