Fix app name, website and redirect URIs not having a maximum length (#16042)

Fix app scopes not being validated
This commit is contained in:
Eugen Rochko
2021-04-15 16:28:43 +02:00
committed by GitHub
parent 3d82a1de05
commit 3b8d085436
3 changed files with 77 additions and 10 deletions

View File

@ -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