summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-05-07 18:36:46 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-05-07 18:36:46 +0000
commitb4bfb6b581035b52a193c74ac74825f3652a014a (patch)
tree5cb102d4869ab473f9c8fa2e7844079b623ca5da /lib/redmine/wiki_formatting
parent9ef1cdd375793b05d9ef7a6036678168f2704750 (diff)
downloadredmine-b4bfb6b581035b52a193c74ac74825f3652a014a.tar.gz
redmine-b4bfb6b581035b52a193c74ac74825f3652a014a.zip
Replaces use of Digest::MD5 / Digest::SHA1 with ActiveSupport::Digest (#35217).
Patch by Jens Krämer (@jkraemer). git-svn-id: https://svn.redmine.org/redmine/trunk@22816 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting')
-rw-r--r--lib/redmine/wiki_formatting/section_helper.rb4
-rw-r--r--lib/redmine/wiki_formatting/textile/formatter.rb2
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/redmine/wiki_formatting/section_helper.rb b/lib/redmine/wiki_formatting/section_helper.rb
index 9221d990d..6f53a3f8e 100644
--- a/lib/redmine/wiki_formatting/section_helper.rb
+++ b/lib/redmine/wiki_formatting/section_helper.rb
@@ -22,13 +22,13 @@ module Redmine
module SectionHelper
def get_section(index)
section = extract_sections(index)[1]
- hash = Digest::MD5.hexdigest(section)
+ hash = ActiveSupport::Digest.hexdigest(section)
return section, hash
end
def update_section(index, update, hash=nil)
t = extract_sections(index)
- if hash.present? && hash != Digest::MD5.hexdigest(t[1])
+ if hash.present? && hash != ActiveSupport::Digest.hexdigest(t[1])
raise Redmine::WikiFormatting::StaleSectionError
end
diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb
index 1cacfeed6..35684a6c7 100644
--- a/lib/redmine/wiki_formatting/textile/formatter.rb
+++ b/lib/redmine/wiki_formatting/textile/formatter.rb
@@ -17,8 +17,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-require 'digest/md5'
-
module Redmine
module WikiFormatting
module Textile