rapid7/metasploit_data_models — pull request #48 by wchen-r7 (2013-12-19 21:38:57+00:00)
Title: Add the missing clients association

Originally found by a user:

```
[12/12/2013 03:00:45] [i(0)] core: windows/meterpreter/reverse_tcp: iteration 1: Successfully encoded with encoder x86/shikata_ga_nai (size is 334)
[12/12/2013 03:01:24] [e(0)] rex: Proc::on_request: NoMethodError: undefined method `clients' for #

/opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/activemodel-3.2.14/lib/active_model/attribute_methods.rb:407:in `method_missing'
/opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/attribute_methods.rb:149:in `method_missing'
/opt/metasploit/apps/pro/msf3/lib/msf/core/db.rb:1197:in `block in report_client'
/opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'
/opt/metasploit/apps/pro/msf3/lib/msf/core/db.rb:1189:in `report_client'
/opt/metasploit/apps/pro/msf3/lib/msf/core/auxiliary/report.rb:83:in `report_client'
/opt/metasploit/apps/pro/msf3/lib/msf/core/exploit/remote/browser_exploit_server.rb:308:in `process_browser_info'
/opt/metasploit/apps/pro/msf3/lib/msf/core/exploit/remote/browser_exploit_server.rb:419:in `on_request_uri'
/opt/metasploit/apps/pro/msf3/lib/msf/core/exploit/http/server.rb:196:in `block in start_service'
/opt/metasploit/apps/pro/msf3/lib/rex/proto/http/handler/proc.rb:38:in `call'
/opt/metasploit/apps/pro/msf3/lib/rex/proto/http/handler/proc.rb:38:in `on_request'
/opt/metasploit/apps/pro/msf3/lib/rex/proto/http/server.rb:363:in `dispatch_request'
/opt/metasploit/apps/pro/msf3/lib/rex/proto/http/server.rb:297:in `on_client_data'
/opt/metasploit/apps/pro/msf3/lib/rex/proto/http/server.rb:157:in `block in start'
/opt/metasploit/apps/pro/msf3/lib/rex/io/stream_server.rb:48:in `call'
/opt/metasploit/apps/pro/msf3/lib/rex/io/stream_server.rb:48:in `on_client_data'
/opt/metasploit/apps/pro/msf3/lib/rex/io/stream_server.rb:192:in `block in monitor_clients'
/opt/metasploit/apps/pro/msf3/lib/rex/io/stream_server.rb:190:in `each'
/opt/metasploit/apps/pro/msf3/lib/rex/io/stream_server.rb:190:in `monitor_clients'
/opt/metasploit/apps/pro/msf3/lib/rex/io/stream_server.rb:73:in `block in start'
/opt/metasploit/apps/pro/msf3/lib/rex/thread_factory.rb:22:in `call'
/opt/metasploit/apps/pro/msf3/lib/rex/thread_factory.rb:22:in `block in spawn'
/opt/metasploit/apps/pro/msf3/lib/msf/core/thread_manager.rb:100:in `call'
/opt/metasploit/apps/pro/msf3/lib/msf/core/thread_manager.rb:100:in `block in spawn'
```

To reproduce:

- [ ] Run msfconsole
- [ ] Make sure you are connected to a database
- [ ]Run the ms13_090_cardspacesigninhelper.rb module and that would hit the same bug again.