Skip to content

Commit

Permalink
fix login status issues too
Browse files Browse the repository at this point in the history
should not set a login's status back to UNTRIED if
it has already been tried.
  • Loading branch information
David Maloney authored and David Maloney committed Dec 9, 2014
1 parent 7801193 commit feb81e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/metasploit/credential/creation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ def create_credential_login(opts={})

login_object.access_level = access_level if access_level
login_object.last_attempted_at = last_attempted_at if last_attempted_at
if status == Metasploit::Model::Login::Status::UNTRIED
if login_object.status.blank?
login_object.status = status
end
else
login_object.status = status
end
login_object.status = status
login_object.save!
end
Expand Down

0 comments on commit feb81e3

Please sign in to comment.