Skip to content

Commit

Permalink
Merge pull request #33 from Anduin2017/patch-2
Browse files Browse the repository at this point in the history
Update SessionBasedCaptcha.cs to fix #32
  • Loading branch information
EdiWang authored Jul 14, 2024
2 parents 605e473 + 9a532c5 commit ad4d86d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Edi.Captcha/Edi.Captcha.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>3.23.0</Version>
<Version>3.23.1</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Company>edi.wang</Company>
<Authors>Edi Wang</Authors>
Expand All @@ -22,4 +22,4 @@
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
<None Include="..\..\img\edi-logo-blue.png" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions src/Edi.Captcha/SessionBasedCaptcha.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class SessionBasedCaptchaOptions
public FontStyle FontStyle { get; set; } = FontStyle.Regular;
public string FontName { get; set; }
public bool DrawLines { get; set; } = true;
public string[] BlockedCodes { get; set; }
public string[] BlockedCodes { get; set; } = [];
}

public abstract class SessionBasedCaptcha : ISessionBasedCaptcha
Expand Down Expand Up @@ -84,4 +84,4 @@ private static void EnsureHttpSession(ISession httpSession)
"Session can not be null, please check if Session is enabled in ASP.NET Core via services.AddSession() and app.UseSession().");
}
}
}
}

0 comments on commit ad4d86d

Please sign in to comment.