Project

General

Profile

Actions

Defect #2264

closed

md5 incorrect on Windows

Added by Yaroslav Matsera over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
2008-12-02
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

md5 calculated incorrect for files, that contains "\r\n" on Windows platform.
line:
self.digest = Digest::MD5.hexdigest(File.read(diskfile))
replaced "\r\n" -> "\n" and than calculated checksum

for file in attachment correct md5 is f2789658fd0737100f4dd1fac58c08e9 but redmine calculate it as 37c4b87edffc5d198ff5a185cee7ee09

ruby script/about:
About your application's environment
Ruby version 1.8.6 (i386-mswin32)
RubyGems version 1.3.1
Rails version 2.0.2
Active Record version 2.0.2
Action Pack version 2.0.2
Active Resource version 2.0.2
Action Mailer version 2.0.2
Active Support version 2.0.2
Edge Rails revision rel_2-0-2
Application root C:/Program Files/Ruby/redmine
Environment production
Database adapter postgresql (8.3.4 win i386)


Files

2.txt (45 Bytes) 2.txt Example file Yaroslav Matsera, 2008-12-02 14:50
Actions #1

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

This should be fixed in r2085.

Actions

Also available in: Atom PDF