metasploit-credential 0.7.14 → 0.7.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -511,6 +511,39 @@ describe Metasploit::Credential::Creation do
511
511
  }
512
512
  expect{ test_object.invalidate_login(opts) }.to change{untried_login.reload.last_attempted_at}
513
513
  end
514
+
515
+ context 'when a login exists on the same service for a different credential' do
516
+ let(:other_origin) {
517
+ FactoryGirl.create(:metasploit_credential_origin_manual)
518
+ }
519
+ let(:other_core) {
520
+ FactoryGirl.create(:metasploit_credential_core,
521
+ workspace: untried_login.core.workspace,
522
+ origin: other_origin
523
+ )
524
+ }
525
+ let(:other_login) {
526
+ FactoryGirl.create(:metasploit_credential_login,
527
+ status: Metasploit::Model::Login::Status::UNTRIED,
528
+ service: untried_login.service,
529
+ core: other_core
530
+ )
531
+ }
532
+
533
+ it 'updates the status on the correct login' do
534
+ opts = {
535
+ address: untried_login.service.host.address,
536
+ port: untried_login.service.port,
537
+ protocol: untried_login.service.proto,
538
+ public: untried_login.core.public.username,
539
+ private: untried_login.core.private.data,
540
+ realm_key: untried_login.core.realm.try(:key),
541
+ realm_value: untried_login.core.realm.try(:value),
542
+ status: Metasploit::Model::Login::Status::INCORRECT
543
+ }
544
+ expect{ test_object.invalidate_login(opts) }.to_not change{other_login.reload.status}
545
+ end
546
+ end
514
547
  end
515
548
  end
516
549
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit-credential
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.14
4
+ version: 0.7.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Imhoff
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-26 00:00:00.000000000 Z
12
+ date: 2014-07-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: metasploit-concern