From 64816e50b57ced52f5fb0082f97b2844e002cf11 Mon Sep 17 00:00:00 2001 From: J Guthrie Date: Sun, 4 Nov 2018 16:47:02 +0000 Subject: [PATCH] Added more non-ascii chars to validation (matching list of chars in other models) --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 04524e6a2..37351c6b2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -89,7 +89,7 @@ class User < ActiveRecord::Base :styles => { :large => "100x100>", :small => "50x50>" } INVALID_ASCII_CHARS = "/;.,?%#".freeze - INVALID_NON_ASCII_CHARS = "\x00-\x1f\x7f\ufffe\uffff".freeze + INVALID_NON_ASCII_CHARS = "\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\ufffe\uffff".freeze validates :display_name, :presence => true, :allow_nil => true, :length => 3..255, :exclusion => %w[new terms save confirm confirm-email go_public reset-password forgot-password suspended] -- 2.43.2