ion1-mischacks 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,4 +1,4 @@
1
- === 0.0.1 / 2009-06-28
1
+ === 0.0.2 / 2009-06-28
2
2
 
3
3
  * Initial release
4
4
 
data/README.txt CHANGED
@@ -4,19 +4,27 @@
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- Safely pass parameters to sh scripts.
7
+ Safely pass untrusted parameters to sh scripts
8
8
 
9
9
  == FEATURES/PROBLEMS:
10
10
 
11
+ The sh method is only safe if your sh script is safe. If unsure, add double
12
+ quotation marks around all variable references ("$1", "$foo", "$@"), and never,
13
+ ever use an untrusted variable as a command.
14
+
11
15
  == SYNOPSIS:
12
16
 
13
17
  MiscHacks.sh %q{
14
18
  diff -u "$1" "$2" | tr a-z A-Z >"$output"
15
19
  }, '/dev/null', '/etc/motd', :output => 'foo'
16
20
 
21
+ unsafe_str = %q{" 'foo' $(bar) `baz` "}
22
+ MiscHacks.sh 'printf "%s\n" "$1"', unsafe_str
23
+
17
24
  == REQUIREMENTS:
18
25
 
19
- * None
26
+ * POSIX sh
27
+ * A system that implements fork
20
28
 
21
29
  == INSTALL:
22
30
 
data/lib/mischacks.rb CHANGED
@@ -14,7 +14,7 @@
14
14
  # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
15
 
16
16
  module MiscHacks
17
- VERSION = '0.0.1'
17
+ VERSION = '0.0.2'
18
18
 
19
19
  class ChildError < RuntimeError
20
20
  attr_reader :status
data/mischacks.gemspec CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mischacks}
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Johan Kiviniemi"]
9
9
  s.date = %q{2009-06-28}
10
- s.description = %q{Safely pass parameters to sh scripts.}
10
+ s.description = %q{Safely pass untrusted parameters to sh scripts}
11
11
  s.email = ["devel@johan.kiviniemi.name"]
12
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
13
13
  s.files = ["COPYING", "History.txt", "Manifest.txt", "README.txt", "Rakefile", "lib/mischacks.rb", "mischacks.gemspec", "spec/mischacks_spec.rb", "spec/spec_helper.rb"]
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.require_paths = ["lib"]
18
18
  s.rubyforge_project = %q{mischacks}
19
19
  s.rubygems_version = %q{1.3.1}
20
- s.summary = %q{Safely pass parameters to sh scripts.}
20
+ s.summary = %q{Safely pass untrusted parameters to sh scripts}
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ion1-mischacks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Kiviniemi
@@ -22,7 +22,7 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 2.3.1
24
24
  version:
25
- description: Safely pass parameters to sh scripts.
25
+ description: Safely pass untrusted parameters to sh scripts
26
26
  email:
27
27
  - devel@johan.kiviniemi.name
28
28
  executables: []
@@ -69,6 +69,6 @@ rubyforge_project: mischacks
69
69
  rubygems_version: 1.2.0
70
70
  signing_key:
71
71
  specification_version: 2
72
- summary: Safely pass parameters to sh scripts.
72
+ summary: Safely pass untrusted parameters to sh scripts
73
73
  test_files: []
74
74