From: J Guthrie Date: Sun, 4 Nov 2018 16:47:02 +0000 (+0000) Subject: Added more non-ascii chars to validation (matching list of chars in other models) X-Git-Tag: live~2811^2~10 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/64816e50b57ced52f5fb0082f97b2844e002cf11 Added more non-ascii chars to validation (matching list of chars in other models) --- 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]