app/periscope/periscope_controller.rb in periscope_rails-0.0.12 vs app/periscope/periscope_controller.rb in periscope_rails-0.0.13

- old
+ new

@@ -20,17 +20,18 @@ unless PeriscopeRails::Config.check_password(params[:password].to_s) render :json => merge_on_metadata({:error => "Password invalid."}) end end + def merge_on_metadata(hash) version = nil begin version = Gem.loaded_specs["periscope_rails"].version.version rescue version = "error" end - return hash.merge({ :version => version, :database_type => get_db_type }) + return hash.merge({ :version => version, :database_type => get_db_type, :server_type => 'rails' }) end def run_sql(sql_command) #TODO: protect based on CFG, not blacklist bad_words = %W{drop delete update into insert index add remove grant revoke create createdb}