diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/commands/console/console_command.rb | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 83a7b6cf01..b79dbdbc6f 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -18,7 +18,8 @@ module Rails :session_options, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x, :enable_dependency_loading, :read_encrypted_secrets, :log_level, :content_security_policy_report_only, - :content_security_policy_nonce_generator, :require_master_key, :credentials + :content_security_policy_nonce_generator, :require_master_key, :credentials, + :disable_sandbox attr_reader :encoding, :api_only, :loaded_config_version, :autoloader @@ -65,6 +66,7 @@ module Rails @credentials.content_path = default_credentials_content_path @credentials.key_path = default_credentials_key_path @autoloader = :classic + @disable_sandbox = false end def load_defaults(target_version) diff --git a/railties/lib/rails/commands/console/console_command.rb b/railties/lib/rails/commands/console/console_command.rb index e35faa5b01..7a9eaefea1 100644 --- a/railties/lib/rails/commands/console/console_command.rb +++ b/railties/lib/rails/commands/console/console_command.rb @@ -26,6 +26,12 @@ module Rails @options = options app.sandbox = sandbox? + + if sandbox? && app.config.disable_sandbox + puts "Error: Unable to start console in sandbox mode as sandbox mode is disabled (config.disable_sandbox is true)." + exit 1 + end + app.load_console @console = app.config.console || IRB |