Stricter validation of given revisions of repositories (#35085).

Patch by Holger Just.


git-svn-id: http://svn.redmine.org/redmine/trunk@20962 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2021-04-23 00:46:45 +00:00
parent ccd00df71c
commit 1cf427ee63
5 changed files with 46 additions and 8 deletions

View File

@@ -296,6 +296,15 @@ module Redmine
Annotate.new
end
def valid_name?(name)
return false unless name.nil? || name.is_a?(String)
# Mercurials names don't need to be checked further as its CLI
# interface is restrictive enough to reject any invalid names on its
# own.
true
end
class Revision < Redmine::Scm::Adapters::Revision
# Returns the readable identifier
def format_identifier