console1984 0.1.29 → 0.1.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e6d3bffb321c5f76f56fbb28fa2b0bf289449c7fc927d0c9f1e729a3d47a756
4
- data.tar.gz: a3ce603cadc5d9d3cc0772947f529865a1659fedb5752a4915b19bbdfae10871
3
+ metadata.gz: 534f4adb54490c9f5cb39a9e068e9d15ac2d84d05a7e7ed97e287b132021b52d
4
+ data.tar.gz: 2d6d1f7059db9bb2c4561136b45ef57b74a8ab8f86dd59a2a80fd6c117bdd5f6
5
5
  SHA512:
6
- metadata.gz: a8243c4ff8a978058ab781b8c8cdc1d1c7139be178973a7df7106bfcc23c470feb19686f2370c0e5d6843fd91b6bfe5155291177c430acb281c2975c58a8647b
7
- data.tar.gz: 17b9eeaf8f599d599ab86b325e8ef755b330a40291704b036ca121f96410bbb145063e50a2091b2e6d4f7dbf237d076e2b70e1be9693a61eb2c408b7182102fe
6
+ metadata.gz: ac7e2d0297fe375b638e8f1b1887889296fca195fd54cd489605420866399ff85506e525d4a173c95ccca988ed97767a7302d0a821cd7c0a36f7fe993a07d86a
7
+ data.tar.gz: 69f8d533ea41a90b038b713875d125f156bfebdec950c1a4c72a326a05ea551d01c170766fe941d2cb69e5ff55ba564953834e2759afe453eece87ee4c2a8b08
@@ -29,6 +29,8 @@ class Console1984::CommandExecutor
29
29
  # We detected that a forbidden command was executed. We exit IRB right away.
30
30
  flag_suspicious(commands, error: error)
31
31
  Console1984.supervisor.exit_irb
32
+ rescue => error
33
+ raise encrypting_error(error)
32
34
  ensure
33
35
  run_as_system { session_logger.after_executing commands }
34
36
  end
@@ -97,4 +99,20 @@ class Console1984::CommandExecutor
97
99
  ensure
98
100
  @executing_user_command = original_value
99
101
  end
102
+
103
+ def encrypting_error(error)
104
+ if error.respond_to?(:inspect)
105
+ def error.inspect
106
+ Console1984.command_executor.execute_in_protected_mode { method(:inspect).super_method.call }
107
+ end
108
+ end
109
+
110
+ if error.respond_to?(:to_s)
111
+ def error.to_s
112
+ Console1984.command_executor.execute_in_protected_mode { method(:to_s).super_method.call }
113
+ end
114
+ end
115
+
116
+ error
117
+ end
100
118
  end
@@ -1,3 +1,3 @@
1
1
  module Console1984
2
- VERSION = "0.1.29"
2
+ VERSION = "0.1.31"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console1984
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.29
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-10 00:00:00.000000000 Z
11
+ date: 2023-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow