Skip to content

Commit 5ad817e

Browse files
authored
Merge branch 'master' into master
2 parents ea7cad7 + 823239b commit 5ad817e

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
namespace HttpAuthModule
77
{
8-
internal class BasicAuthStragegy : CredentialAuthStrategy
8+
internal class BasicAuthStrategy : CredentialAuthStrategy
99
{
1010
private string[] _validAuthVals;
1111

12-
public BasicAuthStragegy()
12+
public BasicAuthStrategy()
1313
: base()
1414
{
1515
_validAuthVals = Credentials
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
namespace HttpAuthModule
1111
{
12-
internal class DigestAuthStragegy : CredentialAuthStrategy
12+
internal class DigestAuthStrategy : CredentialAuthStrategy
1313
{
1414
private TimeSpan _nonceValidDuration;
1515
private string _nonceSalt;
1616

1717
private Dictionary<string, string> _validTokens;
1818

19-
public DigestAuthStragegy()
19+
public DigestAuthStrategy()
2020
: base()
2121
{
2222
var nonceValidDuration = Config.Get("DigestNonceValidDuration", "120");

HttpAuthModule/HttpAuthModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private void InitializeStatic()
4444

4545
var restrictIPAddresses = Config.Get("RestrictIPAddresses");
4646
if (!string.IsNullOrEmpty(restrictIPAddresses))
47-
_authStrategies.Add(new RestictIPStrategy(restrictIPAddresses));
47+
_authStrategies.Add(new RestrictIPStrategy(restrictIPAddresses));
4848

4949
switch (Config.Get("AuthMode").ToLower())
5050
{

HttpAuthModule/HttpAuthModule.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@
4444
<Reference Include="System.Xml" />
4545
</ItemGroup>
4646
<ItemGroup>
47-
<Compile Include="BasicAuthStragegy.cs" />
47+
<Compile Include="BasicAuthStrategy.cs" />
4848
<Compile Include="Config.cs" />
4949
<Compile Include="Credential.cs" />
5050
<Compile Include="CredentialAuthStrategy.cs" />
51-
<Compile Include="DigestAuthStragegy.cs" />
51+
<Compile Include="DigestAuthStrategy.cs" />
5252
<Compile Include="HttpAuthModule.cs" />
5353
<Compile Include="IAuthStrategy.cs" />
5454
<Compile Include="IPAddressRange.cs" />
5555
<Compile Include="Properties\AssemblyInfo.cs" />
56-
<Compile Include="RestictIPStragegy.cs" />
56+
<Compile Include="RestrictIPStrategy.cs" />
5757
</ItemGroup>
5858
<ItemGroup>
5959
<None Include="HttpAuthModule.nuspec" />

HttpAuthModule/IPAddressRange.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace HttpAuthModule
88
internal class IPAddressRange
99
{
1010
private AddressFamily _addressFamily;
11-
private byte[] _netowrkAddressBytes;
11+
private byte[] _networkAddressBytes;
1212
private byte[] _subnetMaskBytes;
1313

1414
/// <param name="ipRangeStr">
@@ -42,8 +42,8 @@ public IPAddressRange(string ipRangeString)
4242
else
4343
maskRange = maxMaskRange;
4444

45-
_netowrkAddressBytes = ipAddr.GetAddressBytes();
46-
_subnetMaskBytes = Enumerable.Repeat<byte>(0xFF, _netowrkAddressBytes.Length).ToArray();
45+
_networkAddressBytes = ipAddr.GetAddressBytes();
46+
_subnetMaskBytes = Enumerable.Repeat<byte>(0xFF, _networkAddressBytes.Length).ToArray();
4747

4848
for (int i = 0; i < (maxMaskRange - maskRange); i++)
4949
_subnetMaskBytes[_subnetMaskBytes.Length - 1 - i / 8] -= (byte)(1 << (i % 8));
@@ -56,7 +56,7 @@ public bool IsInRange(IPAddress ipAddr)
5656

5757
var addrBytes = ipAddr.GetAddressBytes();
5858
for (int i = 0; i < addrBytes.Length; i++)
59-
if ((addrBytes[i] & _subnetMaskBytes[i]) != _netowrkAddressBytes[i])
59+
if ((addrBytes[i] & _subnetMaskBytes[i]) != _networkAddressBytes[i])
6060
return false;
6161

6262
return true;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
namespace HttpAuthModule
77
{
8-
internal class RestictIPStragegy : IAuthStrategy
8+
internal class RestrictIPStrategy : IAuthStrategy
99
{
1010
private IPAddressRange[] _ranges;
1111

12-
public RestictIPStragegy(string ipAddresses)
12+
public RestrictIPStrategy(string ipAddresses)
1313
{
1414
_ranges = ipAddresses.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)
1515
.Select(s => new IPAddressRange(s))

0 commit comments

Comments
 (0)