diff --git a/nselib/brute.lua b/nselib/brute.lua index 150ebd542..f97669655 100644 --- a/nselib/brute.lua +++ b/nselib/brute.lua @@ -262,7 +262,7 @@ Account = if ( #self.username > 0 ) then creds = ("%s:%s"):format( self.username, #self.password > 0 and self.password or "" ) else - creds = ("%s"):format( self.password ) + creds = ("%s"):format( ( self.password and #self.password > 0 ) and self.password or "" ) end -- An account have the following states