Changeset 1344

Show
Ignore:
Timestamp:
03/07/08 15:30:25 (6 months ago)
Author:
kindlund
Message:

Fixed regression, re: #146

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hive/trunk/data_webapp/app/controllers/hc_database_controller.rb

    r1342 r1344  
    11require 'base64' 
     2require 'yaml' 
    23require 'rbyaml' 
    34 
     
    4445      obj_hash = obj_str 
    4546    else 
    46       obj_hash = RbYAML.load(obj_str) 
     47      obj_hash = YAML.load(obj_str) 
    4748    end 
    4849    count = 0 
     
    6364  # Removes all references from the queue. 
    6465  def insert_history_urls(obj_str) 
    65     obj_hash = RbYAML.load(obj_str) 
     66    obj_hash = YAML.load(obj_str) 
    6667    cid = obj_hash.delete("client_id") 
    6768    hid = Client.find(cid).host_id 
     
    104105  # Insert fingerprints from a suspicious VM 
    105106  def insert_fingerprint(obj_str) 
    106     obj_hash = RbYAML.load(obj_str) 
     107    obj_hash = YAML.load(obj_str) 
    107108 
    108109    # Remove compromise time from fingerprint and use to update related client object 
     
    113114 
    114115  def insert_client(obj_str) 
    115     obj_hash = RbYAML.load(obj_str) 
     116    obj_hash = YAML.load(obj_str) 
    116117    insert(Client,obj_hash) 
    117118  end 
    118119 
    119120  def set_client_compromised(id_str) 
    120     cid = RbYAML.load(id_str) 
     121    cid = YAML.load(id_str) 
    121122    Client.update(cid,{:status => "compromised"}) 
    122123  end 
    123124 
    124125  def set_client_suspended(id_str) 
    125     cid = RbYAML.load(id_str) 
     126    cid = YAML.load(id_str) 
    126127    Client.update(cid,{:status => "suspended"}) 
    127128  end 
    128129 
    129130  def set_client_running(id_str) 
    130     cid = RbYAML.load(id_str) 
     131    cid = YAML.load(id_str) 
    131132    Client.update(cid,{:status => "running"}) 
    132133  end 
    133134   
    134135  def set_client_deleted(id_str) 
    135     cid = RbYAML.load(id_str) 
     136    cid = YAML.load(id_str) 
    136137    Client.update(cid,{:status => "deleted"}) 
    137138  end 
    138139 
    139140  def set_client_bug(id_str) 
    140     cid = RbYAML.load(id_str) 
     141    cid = YAML.load(id_str) 
    141142    Client.update(cid,{:status => "bug"}) 
    142143  end 
    143144 
    144145  def set_client_unknown(id_str) 
    145     cid = RbYAML.load(id_str) 
     146    cid = YAML.load(id_str) 
    146147    Client.update(cid,{:status => "unknown"}) 
    147148  end 
     
    149150  # Input YAML encoded hash table of format {"client_id" => <int>, "compromise" => <timestamp>} 
    150151  def set_client_suspicious(compromise_str) 
    151     compromise_hash = RbYAML.load(compromise_str) 
     152    compromise_hash = YAML.load(compromise_str) 
    152153    cid = compromise_hash.delete("client_id") 
    153154    time = compromise_hash.delete("compromise")