about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-04-15 16:28:43 +0200
committerGitHub <noreply@github.com>2021-04-15 16:28:43 +0200
commit3b8d085436fa38aed4d5fa3650e433fc7215b104 (patch)
treed466c4b2957acbe41c1b578b7cf1c86e6774985c /app/lib
parent3d82a1de052ff3cf8698985eb3e8c1cd73c7eedd (diff)
Fix app name, website and redirect URIs not having a maximum length (#16042)
Fix app scopes not being validated
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/application_extension.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/lib/application_extension.rb b/app/lib/application_extension.rb
index 1d80b8c6d..e61cd0721 100644
--- a/app/lib/application_extension.rb
+++ b/app/lib/application_extension.rb
@@ -4,6 +4,8 @@ module ApplicationExtension
   extend ActiveSupport::Concern
 
   included do
-    validates :website, url: true, if: :website?
+    validates :name, length: { maximum: 60 }
+    validates :website, url: true, length: { maximum: 2_000 }, if: :website?
+    validates :redirect_uri, length: { maximum: 2_000 }
   end
 end