From b26067e5da5968e835ceac06468ecee26ead28f0 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 16 Mar 2018 10:41:53 -0400 Subject: [PATCH] domain search term must be at least 3 characters --- src/App/Services/CipherService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App/Services/CipherService.cs b/src/App/Services/CipherService.cs index e1ee71ab3..ab3af6dda 100644 --- a/src/App/Services/CipherService.cs +++ b/src/App/Services/CipherService.cs @@ -483,8 +483,10 @@ namespace Bit.App.Services (loginNameString != null && loginNameString.Contains(term)); if(!addedFromSearchTerm) { - addedFromSearchTerm = (loginDomainName != null && term.Contains(loginDomainName.Split('.')[0])) - || (loginNameString != null && term.Contains(loginNameString)); + var domainTerm = loginDomainName?.Split('.')[0]; + addedFromSearchTerm = + (domainTerm != null && domainTerm.Length > 2 && term.Contains(domainTerm)) || + (loginNameString != null && term.Contains(loginNameString)); } if(addedFromSearchTerm)