Skip to content

Commit

Permalink
Merge pull request #689 from datacite/rights-list
Browse files Browse the repository at this point in the history
Limit size of rights content
  • Loading branch information
Martin Fenner authored Dec 22, 2020
2 parents 8e75331 + b260177 commit 76265bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,7 @@ def check_dates
def check_rights_list
Array.wrap(rights_list).each do |r|
errors.add(:rights_list, "Rights '#{r}' should be an object instead of a string.") unless r.is_a?(Hash)
errors.add(:rights_list, "Rights should not have a length of more than 2000 characters.") if r["rights"].length > 2000
end
end

Expand Down
Loading

0 comments on commit 76265bd

Please sign in to comment.