summaryrefslogtreecommitdiffstats
path: root/app/models/wiki.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-19 11:13:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-19 11:13:41 +0000
commit7b3f2b51c0ea735a4723fae24eff9bfbca254d8a (patch)
tree9d3f5786993a64e0f106ba82f31a9a1d8d06e6bb /app/models/wiki.rb
parente610fda877a44c7b194edddcbe6c71bb234401a1 (diff)
downloadredmine-7b3f2b51c0ea735a4723fae24eff9bfbca254d8a.tar.gz
redmine-7b3f2b51c0ea735a4723fae24eff9bfbca254d8a.zip
Add length validations for string fields (#24283).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@15989 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/wiki.rb')
-rw-r--r--app/models/wiki.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index 188cb5b6c..e629baf9b 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -25,6 +25,7 @@ class Wiki < ActiveRecord::Base
validates_presence_of :start_page
validates_format_of :start_page, :with => /\A[^,\.\/\?\;\|\:]*\z/
+ validates_length_of :title, maximum: 255
attr_protected :id
before_destroy :delete_redirects