[#46037] Re: [ruby-core:47138] [ruby-trunk - Bug #6861][Open] ERB::Util.escape_html is not escaping single quotes — Shugo Maeda <shugo@...>

咳さん

12 messages 2012/08/13
[#46038] Re: [ruby-core:47138] [ruby-trunk - Bug #6861][Open] ERB::Util.escape_html is not escaping single quotes — Masatoshi SEKI <m_seki@...> 2012/08/13

=1B$B31$H$$$$$^$9!#=1B(B

[#46051] [ruby-trunk - Feature #6875][Open] Make test/unit default gem — "kou (Kouhei Sutou)" <kou@...>

19 messages 2012/08/15

[#46081] [ruby-trunk - Feature #6936][Assigned] Forbid singleton class and instance variabls for float — "naruse (Yui NARUSE)" <naruse@...>

17 messages 2012/08/26
[#46082] Re: [ruby-trunk - Feature #6936][Assigned] Forbid singleton class and instance variabls for float — SASADA Koichi <ko1@...> 2012/08/27

(2012/08/27 8:12), naruse (Yui NARUSE) wrote:

[ruby-dev:46034] [ruby-trunk - Bug #5637] warnings of shellescape

From: "knu (Akinori MUSHA)" <knu@...>
Date: 2012-08-08 11:25:05 UTC
List: ruby-dev #46034
Issue #5637 has been updated by knu (Akinori MUSHA).


As I documented, it's all up to how you use the resulted string.

If you are going to pass it to a shell that lacks support for the encoding of the string, then you should probably encode the original string in ASCII-8BIT before shell-escaping with shellescape() to get a byte-by-byte escape to make sure the shell won't find a metacharacter inside a multibyte character.

UTF-8 multibyte characters do not contain any ASCII character by design anyway, so most people in the everything-is-UTF-8 world don't even have to care about this.

But, for example, when you have to run a program passing a Shift_JIS string via a shell under a non-Shift_JIS locale, you'd probably have to compose the command line in the ASCII-8BIT encoding so that all shell metacharacters that may appear in Shift_JIS multibyte characters are properly escaped.
----------------------------------------
Bug #5637: warnings of shellescape
https://bugs.ruby-lang.org/issues/5637#change-28727

Author: znz (Kazuhiro NISHIYAMA)
Status: Closed
Priority: Normal
Assignee: knu (Akinori MUSHA)
Category: lib
Target version: 2.0.0
ruby -v: -


\\あ


-- 
http://bugs.ruby-lang.org/

In This Thread

Prev Next