From cb3316db45e369ba31d97c5ee2dcd9c353a3cb5d Mon Sep 17 00:00:00 2001 From: Anjana Date: Thu, 22 Oct 2015 15:26:39 -0400 Subject: [PATCH] Fixes #265: Change whitelist/blacklist to safelist/blocklist Closes #281. --- source | 121 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/source b/source index 65073c047ce..ac801ffa740 100644 --- a/source +++ b/source @@ -1213,7 +1213,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d attack in the process, to the catastrophic, such as deleting all data in the server.

When writing filters to validate user input, it is imperative that filters always be - whitelist-based, allowing known-safe constructs and disallowing all other input. Blacklist-based + safelist-based, allowing known-safe constructs and disallowing all other input. Blocklist-based filters that disallow known-bad inputs and allow everything else are not secure, as not everything that is bad is yet known (for example, because it might be invented in the future).

@@ -1244,17 +1244,17 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

There are many constructs that can be used to try to trick a site into executing code. Here - are some that authors are encouraged to consider when writing whitelist filters:

+ are some that authors are encouraged to consider when writing safelist filters: