IsSkipIPorHost() PW/SMS 인증패스 기능 수정
This commit is contained in:
parent
525f0e7c7a
commit
cee250389c
|
|
@ -2,6 +2,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
|
|
@ -569,6 +570,48 @@ public static class Helpers
|
|||
/// <returns>true:skip처리, false:skip하지않음</returns>
|
||||
/// </summary>
|
||||
public static bool IsSkipIPorHost(IpHostSkipGb gb, string ip, string host)
|
||||
{
|
||||
// HS 기존코드 변경
|
||||
|
||||
bool isReulst = false;
|
||||
|
||||
ip = ip ?? "";
|
||||
host = host ?? "";
|
||||
|
||||
// PassWord 스킵
|
||||
string[] skipIpsForPassword = { "218.232.111.111" };
|
||||
string[] skipHostsForPassword = { "ynictea.nptc.kr", "admin.ynicte.com" };
|
||||
|
||||
// SmsAuth 스킵
|
||||
string[] skipIpsForSms = { "218.232.111.111" };
|
||||
string[] skipHostsForSms = { "ynictea.nptc.kr", "admin.ynicte.com" };
|
||||
|
||||
switch (gb)
|
||||
{
|
||||
case IpHostSkipGb.PassWord:
|
||||
if (skipIpsForPassword.Contains(ip) || skipHostsForPassword.Any(h => host.Contains(h)))
|
||||
{
|
||||
isReulst = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case IpHostSkipGb.SmsAuth:
|
||||
if (skipIpsForSms.Contains(ip) || skipHostsForSms.Any(h => host.Contains(h)))
|
||||
{
|
||||
isReulst = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
isReulst = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return isReulst;
|
||||
}
|
||||
|
||||
/*
|
||||
public static bool IsSkipIPorHost(IpHostSkipGb gb, string ip, string host)
|
||||
{
|
||||
string ipAddrs, hosts;
|
||||
//ipAddrs1 = "127.0.0.1,218.232.111.111,59.150.105.195,59.150.105.198";
|
||||
|
|
@ -600,6 +643,8 @@ public static class Helpers
|
|||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 문자열을 지정된 최대 자리수만큼 자르고 초과하면 "..."을 추가.
|
||||
|
|
|
|||
Loading…
Reference in New Issue