console1984 0.1.17 → 0.1.18

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: 58a963520fed8a86952cee9b02443b61d42ac4bf0a80d1abaabfd3ff390f431b
4
- data.tar.gz: a63a68db2a2e46a129f4f97f79a59b41a88fe98ecb9d6028d67ca0e8d4b1e6fa
3
+ metadata.gz: 68e6cdce847f11b0872e12826a4fd65b7e31e267461de5b6e85582a692310e0a
4
+ data.tar.gz: aac2138d6008c87076de90b8944bf246584b47cd061a160c54f0138345491f6d
5
5
  SHA512:
6
- metadata.gz: 2bb93f84dc7e078b4d357739b337b2277fce627408cb619c816a04fc94db7451faf7d2095d0861ca211726ce973481161ae47c4add5e185c8813904462d1c011
7
- data.tar.gz: d1b623b30f72e49d744934e4623159bfabf5cd7b9a4fab94fc08c26c30fc8bf1115bd70bf4b92b12609874d6ab75dc0d978663079745df2b9b1e238cadaf11ed
6
+ metadata.gz: '0388bba4469870ce2616845c31ee6ea34e08e6af1bb3d39e239a87cd4c3c7ee4ec7602f0e928904ae256e0bbc17554e694724067e529026f9d5cae9dff83bc0f'
7
+ data.tar.gz: 2a96eaa2ecd586694a12d0bbf9dc717ef4a9585ebd277a1b538d5e589495742c63cb6d2b8c9918db9b55f07d9c1338416e4d18365628daf7286757d953cdc316
data/README.md CHANGED
@@ -35,6 +35,9 @@ By default, console1984 is only enabled in `production`. You can configure the t
35
35
  config.console1984.protected_environments = %i[ production staging ]
36
36
  ```
37
37
 
38
+ Finally, you need to [configure Active Record Encryption](https://edgeguides.rubyonrails.org/active_record_encryption.html#setup) in your
39
+ project. This is because the library stores the tracked console commands encrypted.
40
+
38
41
  ## How it works
39
42
 
40
43
  ### Session activity logging
@@ -5,7 +5,7 @@ module Console1984::Ext::ActiveRecord::ProtectedAuditableTables
5
5
  %i[ execute exec_query exec_insert exec_delete exec_update exec_insert_all ].each do |method|
6
6
  define_method method do |*args, **kwargs|
7
7
  sql = args.first
8
- if Console1984.command_executor.executing_user_command? && sql =~ auditable_tables_regexp
8
+ if Console1984.command_executor.executing_user_command? && sql.b =~ auditable_tables_regexp
9
9
  raise Console1984::Errors::ForbiddenCommandAttempted, "#{sql}"
10
10
  else
11
11
  super(*args, **kwargs)
@@ -64,7 +64,6 @@ class Console1984::Shield
64
64
  if Object.const_defined?(class_string)
65
65
  klass = class_string.constantize
66
66
  klass.prepend(Console1984::Ext::ActiveRecord::ProtectedAuditableTables)
67
- klass.include(Console1984::Freezeable)
68
67
  end
69
68
  end
70
69
  end
@@ -1,3 +1,3 @@
1
1
  module Console1984
2
- VERSION = '0.1.17'
2
+ VERSION = '0.1.18'
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.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-24 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize