Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.2
-
Fix Version/s: None
-
Component/s: Extensions
-
Labels:None
-
Environment:# uname -a
Linux notebook 2.6.29-4GB #1 SMP PREEMPT Sat Mar 28 01:54:40 CET 2009 i686 i686 i386 GNU/Linux
# jruby --version
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-04-03 rev 6586) [i386-java]
-
Number of attachments :
Description
Execute this ruby code:
require 'iconv'; puts Iconv.conv("iso-8859-1","utf-8","hidden:foo\xA0bar".split(':')[1])
What should happen should be either an output of
"foo�bar"
or an error message
Iconv::IllegalSequence: "\240bar"
However, the output is:
"hidden:foo�bar"
This means that not only the answer is wrong, but also that characters which are not part of the string "foo�bar" (but which used to be somehow "near" to this string in some input) are actually leaking. Thus, input filtering is not working, which is a security issue.
So this is an iconv bug, right? Moving off Java Integration component to Extensions.