From 7ed015aeb15a992a4d75cba0bb06397c1f1d254f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sun, 13 Jan 2019 22:10:45 -0500 Subject: [PATCH] dont sub 1 when getting next random value --- src/App/Services/PasswordGenerationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/Services/PasswordGenerationService.cs b/src/App/Services/PasswordGenerationService.cs index 7f19ad71a..78b55f1ea 100644 --- a/src/App/Services/PasswordGenerationService.cs +++ b/src/App/Services/PasswordGenerationService.cs @@ -168,7 +168,7 @@ namespace Bit.App.Services break; } - var randomCharIndex = Next(positionChars.Length - 1); + var randomCharIndex = Next(positionChars.Length); password.Append(positionChars[randomCharIndex]); }