The Wayback Machine - https://web.archive.org/web/20210412191353/https://github.com/topics/sanitization
Skip to content
#

Sanitization

Sanitizing is a process to check and remove harmful data from user input. It prevents XSS (Cross Site Scripting) attacks.

Here are 84 public repositories matching this topic...

imranismail
imranismail commented Jul 7, 2019

Parameters should be able to support these declaratively.

I'm thinking along these lines:

params do
  requires :name, :string, only: ~w(john mary)
  requires :profession, :string, except: ~w(student engineer)
  requires :email, :string, matches: ~r/.+@.+/
end

The best place to introduce this is during the schema definition step.

Wikipedia
Wikipedia