]> git.openstreetmap.org Git - rails.git/commitdiff
Added more non-ascii chars to validation (matching list of chars in other models)
authorJ Guthrie <jamie.guthrie@gmail.com>
Sun, 4 Nov 2018 16:47:02 +0000 (16:47 +0000)
committerJ Guthrie <jamie.guthrie@gmail.com>
Mon, 5 Nov 2018 14:24:30 +0000 (14:24 +0000)
app/models/user.rb

index 04524e6a2f56d102d10d50a9c3b00ffcd8227e36..37351c6b26c79f08fa2a6fe7e7a99d736b5297d4 100644 (file)
@@ -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]