When Passenger spawns a new app process it now calls establish_connection on ActiveRecord::Base, which causes connection_specification_name to be set back to :primary after we've already set it to nil in the main process. We depend on it being nil so that our custom switching code can take precedence.
With this change, connection_specification_name will always be :primary on spawned processes thus not allowing them to connect to other hosts (or any hosts, if your :primary config is not a production config)
When Passenger spawns a new app process it now calls
establish_connectionon ActiveRecord::Base, which causesconnection_specification_nameto be set back to:primaryafter we've already set it to nil in the main process. We depend on it being nil so that our custom switching code can take precedence.With this change,
connection_specification_namewill always be:primaryon spawned processes thus not allowing them to connect to other hosts (or any hosts, if your :primary config is not a production config)