コード例 #1
0
        private static void Validate(object value)
        {
            if (value == null)
            {
                throw new ArgumentNullException("passport");
            }
            PassportAuthentication authentication = (PassportAuthentication)value;

            if (System.Web.Util.StringUtil.StringStartsWith(authentication.RedirectUrl, @"\\") || ((authentication.RedirectUrl.Length > 1) && (authentication.RedirectUrl[1] == ':')))
            {
                throw new ConfigurationErrorsException(System.Web.SR.GetString("Auth_bad_url"));
            }
        }
コード例 #2
0
        private static void Validate(object value)
        {
            if (value == null)
            {
                throw new ArgumentNullException("passport");
            }
            Debug.Assert(value is PassportAuthentication);

            PassportAuthentication elem = (PassportAuthentication)value;

            if (StringUtil.StringStartsWith(elem.RedirectUrl, "\\\\") ||
                (elem.RedirectUrl.Length > 1 && elem.RedirectUrl[1] == ':'))
            {
                throw new ConfigurationErrorsException(SR.GetString(SR.Auth_bad_url));
            }
        }