After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692866 - Calculating wrong md5 checksum for cyrillic texts
Calculating wrong md5 checksum for cyrillic texts
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.26
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-30 10:21 UTC by Feoktistov Alexander
Modified: 2013-08-05 10:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (1.05 KB, application/x-zip-compressed)
2013-01-30 10:23 UTC, Feoktistov Alexander
Details

Description Feoktistov Alexander 2013-01-30 10:21:14 UTC
Hello.

crypto:md5 calculates equal checksums for almost unequal strings with cyrillic. The same for sha1. For example, checksum for string 'Привет, Мир!' is equal for checksum for string 'Привет, Мир?'.

Test case is attached. My output:
feoktistov@kani:/opt/www/feoktistov/mygit$ xsltproc ~/tmp/test__crypto-md5/test__crypto-md5.xsl ~/tmp/test__crypto-md5/test__crypto-md5.xml 
text = _Привет, Мир!_     md5 = 8a669e9418750c81ab90ae159a8ec410     sha1 = 2805ae8e7e12f182135f92fb90843bb1080d3be8
text = _Привет, Мир?_     md5 = 8a669e9418750c81ab90ae159a8ec410     sha1 = 2805ae8e7e12f182135f92fb90843bb1080d3be8
text = _Привет, Мир _     md5 = 8a669e9418750c81ab90ae159a8ec410     sha1 = 2805ae8e7e12f182135f92fb90843bb1080d3be8
text = _Привет, Мир._     md5 = 8a669e9418750c81ab90ae159a8ec410     sha1 = 2805ae8e7e12f182135f92fb90843bb1080d3be8
text = _Привет, Мир9_     md5 = 8a669e9418750c81ab90ae159a8ec410     sha1 = 2805ae8e7e12f182135f92fb90843bb1080d3be8
text = _Привет, МирЖ_     md5 = 8a669e9418750c81ab90ae159a8ec410     sha1 = 2805ae8e7e12f182135f92fb90843bb1080d3be8
text = _Привет, МирZ_     md5 = 8a669e9418750c81ab90ae159a8ec410     sha1 = 2805ae8e7e12f182135f92fb90843bb1080d3be8
text = _Привет,МирZ _     md5 = 8a669e9418750c81ab90ae159a8ec410     sha1 = 2805ae8e7e12f182135f92fb90843bb1080d3be8
text = _Привет, МирZ _     md5 = ba6285724fc2c4799c83671f582cc11c     sha1 = 35a02a73bfa0479107153ca4f644b49767b38303
text = _Привет,   МирZ_     md5 = fe3a52657e9ea493bc12e08ff9bc7ef3     sha1 = a5095cf9e480565963d34e80e159629e884c90f9
text = _ПриветМирL_     md5 = f4c6ef8d9aa492ac2a2f731b5b917240     sha1 = 6fae7f6277b10c5d8bab7e27ce0db8c40e13ca9d

text = _Hello, World!_     md5 = 65a8e27d8879283831b664bd8b7f0ad4     sha1 = 0a0a9f2a6772942557ab5355d76af442f8f65e01
text = _Hello, World?_     md5 = 925de34d3e74f6439f636a7905458f90     sha1 = 10f5f633e91d0b4e40232aef04a9452c84532407
text = _Hello, World _     md5 = 037644941130118d5aade8cfb92d77d3     sha1 = defa00ad8a0ed31720df3be88d29d0d60f085bd3
text = _Hello, World._     md5 = e9db5cf8349b1166e96a742e198a0dd1     sha1 = 179df601a4e8cfd0a97b29484410a5f42fcbfff1
text = _Hello, World9_     md5 = faf56df200d7f645a7911c4179614ca8     sha1 = 8a420fad2ccc0504448871245cb5769a42a16cdb
text = _Hello, WorldЖ_     md5 = 8b15c586f49631e35411fadd164704ab     sha1 = c64bdbd2469df3e2457d1c62cebfed7e86c39f8e
text = _Hello, WorldZ_     md5 = d6ec5883599d8ad6da7a32a094c1375b     sha1 = cdc052e9c8e42b61fd3d45c72211b4d0bafcd39f

Versions:
feoktistov@kani:/opt/www/feoktistov/mygit$ xsltproc --version
Using libxml 20706, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20706, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20706
libexslt 815 was compiled against libxml 20706
feoktistov@kani:/opt/www/feoktistov/mygit$
Comment 1 Feoktistov Alexander 2013-01-30 10:23:45 UTC
Created attachment 234816 [details]
Test case
Comment 2 Vitaly Ostanin 2013-01-30 10:34:01 UTC
Also reproduced on:

$ xmllint --version
xmllint: using libxml version 20800
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib Lzma 

$ xsltproc --version
Using libxml 20800, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20708
libexslt 815 was compiled against libxml 20708

libgcrypt-1.5.0
Comment 3 Nick Wellnhofer 2013-08-05 10:31:31 UTC
Fixed in commit 387c26fa. Thanks for the report.