عیب یابی خطای زمان اجرا خط مشی XMLThreatProtection

شما در حال مشاهده مستندات Apigee Edge هستید.
به مستندات Apigee X مراجعه کنید .
اطلاعات

اجرا ناموفق بود

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. Reason: error_description at line line_num
        (possibly around char char_num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: Premature end of document while parsing at line 5(possibly  around char 0)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

انواع خطاها و علل احتمالی

سیاست XMLThreatProtection می‌تواند انواع مختلفی از خطاهای ExecutionFailed را ایجاد کند. جدول زیر انواع مختلف خطاها و دلایل احتمالی آنها را فهرست می‌کند:

خطا علت
نام عنصر از حد گذشت حداکثر طول رشته مجاز در یک تگ XML بیش از حد مجاز است.
تعداد فرزندان از حد مجاز فراتر رفت حداکثر تعداد عناصر فرزند مجاز در یک فایل XML از حد مجاز فراتر رفته است.
عمق گره از حد مجاز فراتر رفت حداکثر عمق مجاز عناصر XML در یک XML payload تجاوز کرده است.
تعداد ویژگی‌ها از حد مجاز فراتر رفت تعداد ویژگی‌های موجود در یک عنصر از حداکثر تعداد مجاز فراتر رفته است.
نام ویژگی از حد مجاز فراتر رفت حداکثر طول مجاز برای نام ویژگی بیش از حد مجاز است.
مقدار ویژگی از حد مجاز فراتر رفت حداکثر طول مجاز برای مقدار یک ویژگی بیش از حد مجاز است.
متن تجاوز شده حداکثر طول مجاز برای متن بیش از حد مجاز است.
نظرت تجاوز شد حداکثر طول مجاز برای یک نظر بیش از حد مجاز است.
PIDataExceeded طول داده دستورالعمل پردازش مجاز بیش از حد مجاز است.
PITargetExceeded طول نام دستورالعمل فرآیند بیش از حد مجاز است.
NSURIمتجاوز طول URL فضای نام بیش از حد مجاز است.
NSPrefixExceeded طول پیشوند فضای نام بیش از حد مجاز است.
تعداد کاربران NSCount از حد مجاز فراتر رفت تعداد فضاهای نام استفاده شده در یک عنصر بیش از حد مجاز است.
بار داده XML نامعتبر ورودی XML Payload نامعتبر است.

نام عنصر از حد گذشت

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

ترافیک زمان اجرا، کد پاسخ ۵۰۰ را با خطای زیر برمی‌گرداند:

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. reason: XMLThreatProtection stepDefinition policy_name:
        Element name length exceeded num at line line_num(possibly
        around char char_num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Element name length exceeded 5 at line 1(possibly around char 9)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که ورودی مشخص‌شده توسط عنصر <Source> در سیاست، حاوی عناصر XML باشد که از حداکثر طول مشخص‌شده در عنصر <Element> در زیر عنصر <NameLimits> بیشتر باشند.

برای مثال، اگر عنصر <Element> در سیاست XMLThreatProtection با 5 مشخص شده باشد، اما ورودی شامل عنصری باشد که بیش از ۵ کاراکتر دارد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection، شماره خط و شماره کاراکتر احتمالی در payload ورودی که در آن طول عنصر از حد مجاز تجاوز کرده است را شناسایی کنید.

    برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1, شماره خط در payload برابر با 1 و شماره کاراکتر احتمالی 9.

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Element name
    length exceeded 5 at line 1(possibly around char 9)
    
  2. سیاست ناموفق (که در مرحله 1 شناسایی شد) را بررسی کنید و مقدار مشخص شده در عنصر <Element> را یادداشت کنید.

    برای مثال، در سیاست XMLThreatProtection زیر، <Element> روی 5 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>5</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول عنصر در آن خط از مقدار مشخص شده برای عنصر <Element> (که در مرحله ۲ مشخص شده است) بیشتر است یا خیر. اگر طول عنصر از این مقدار بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <company>
      <name>Google</name>
      <country>USA</country>
    </company>
    

    فایل XML نشان داده شده در بالا دارای یک عنصر ریشه به نام company در خط 1 است که دارای 7 کاراکتر است. از آنجایی که طول عنصر بیشتر از 5 است (مقداری که برای عنصر <Element> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition
    XML-Threat-Protection-1: Element name length exceeded 5 at line 1(possibly around char 9)
    

وضوح تصویر

اگر سیاست XMLThreadProtection برای محافظت در برابر بارهای داده‌ای با نام‌های عنصری که از مقدار تعریف‌شده تجاوز می‌کنند، در نظر گرفته شده باشد، انتظار می‌رود پیام خطا نمایش داده شود. در این حالت، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دهید که عناصر طولانی‌تر می‌توانند بدون هیچ پیامدی در payload مشخص شوند، <Element> بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید به عناصری با طول حداکثر ۱۰ اجازه دهید، سیاست XMLThreatProtection را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>5</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

تعداد فرزندان از حد مجاز فراتر رفت

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition policy_name:
        Execution failed. reason: XMLThreatProtection stepDefinition policy_name:
        Children count exceeded num at line  num(possibly
        around char num)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Children count exceeded 3 at line 5(possibly around char 89)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص شده توسط عنصر <Source> شامل یک عنصر XML باشد که تعداد عناصر فرزند آن از مقدار مشخص شده در عنصر <ChildCount> در خط‌مشی بیشتر باشد.

برای مثال، اگر عنصر <ChildCount> برابر با ۳ باشد، اما فایل XML ورودی دارای عنصری با بیش از ۳ عنصر فرزند باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که تعداد ورودی‌ها در آن از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload 5 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Children
    count exceeded 3 at line 5(possibly around char 89)"
    
  2. سیاست ناموفق (که در مرحله ۱ شناسایی شد) را بررسی کنید و مقدار مشخص شده در عنصر <ChildCount> را یادداشت کنید.

    در مثال سیاست زیر، <ChildCount> روی 3 تنظیم شده است (توجه داشته باشید که نظرات، عناصر include و سایر موارد، جزو این حد شمارش می‌شوند):

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا تعداد عناصر فرزند (شامل همه نظرات و غیره) در payload بیشتر از مقدار مشخص شده برای عنصر <ChildCount> (که در مرحله ۲ مشخص شده است) است یا خیر. اگر تعداد عناصر فرزند از تعداد فرزند بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <movie>
      <title>Jurassic Park</title>
      <language>English</language>
      <country>USA</country>
      <director>Steven Spielberg</director>
    </movie>
    

    در فایل XML نشان داده شده در بالا، خط ۵ شامل یک عنصر فرزند چهارم به <director> از عنصر ریشه <movie> است. از آنجایی که تعداد عناصر فرزند در فایل XML ورودی بیشتر از ۳ است (مقداری که برای عنصر <ChildCount> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Children
    count exceeded 3 at line 5(possibly around char 89)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای با تعداد عناصر فرزند که از یک آستانه خاص فراتر می‌رود، در نظر گرفته شده باشد، انتظار می‌رود پیام خطا ظاهر شود. در این حالت، نیازی به انجام هیچ اقدام اضافی ندارید.

با این حال، اگر تشخیص دهید که تعداد بیشتری از عناصر فرزند (از جمله نظرات و غیره) می‌توانند بدون هیچ پیامدی در payload گنجانده شوند، <ChildCount> بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید تا ۱۰ عنصر فرزند را مجاز کنید، سیاست XMLThreatProtection را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>5</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">10</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

عمق گره از حد مجاز فراتر رفت

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Node depth exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Node depth exceeded 5 at line 6(possibly around char 110)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> حاوی یک سند XML باشد که در آن سلسله مراتب گره از تعداد مشخص‌شده در عنصر <NodeDepth> از خط‌مشی XMLThreatProtection بیشتر باشد.

برای مثال، اگر عنصر <NodeDepth> در سیاست به عنوان 4 مشخص شده باشد، اما عمق گره ورودی از 4 بیشتر باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که در آن از عمق گره تجاوز شده است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload برابر با 6 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Node depth
    exceeded 5 at line 6(possibly around char 109)
    
  2. سیاست XMLThreatProtection ناموفق (که در مرحله 1 شناسایی شد) را بررسی کنید و مقدار مشخص شده در عنصر <NodeDepth> را یادداشت کنید.

    در مثال زیر از سیاست XMLThreatProtection، مقدار <NodeDepth> برابر با 5 است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>5</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا عمق گره مشخص شده در آنجا تعداد بیشتری از تعداد مشخص شده در عنصر <NodeDepth> (که در مرحله ۲ مشخص شده است) دارد یا خیر. اگر سطح عناصر فرزند XML از تعداد بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <hellos>
       <hello1>
           <wave1>
                <wave2>
                    <wave3>
                        <wave4>
                           <wave5>wave</wave5>
                        </wave4>
                    </wave3>
                </wave2>
           </wave1>
       </hello1>
       <hello2>world2</hello2>
       <hello3>world3</hello3>
       <hello4>world4</hello4>
       <hello5>world5</hello5>
       <hello6>world6</hello6>
    </hellos>
    

    XML Payload نشان داده شده در خط 6 دارای عمق گره 6 است . از آنجا که عمق گره بیشتر از 5 است (مقداری که برای عنصر <NodeDepth> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Node depth
    exceeded 5 at line 6(possibly around char 109)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده با آستانه عمق گره خاص در نظر گرفته شده باشد، پیام خطا قابل انتظار است. در این حالت، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دادید که عمق گره بیشتری مجاز است، <NodeDepth> را بر اساس نیاز خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید عمق گره تا 10 را مجاز کنید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

تعداد ویژگی‌ها از حد مجاز فراتر رفت

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Attribute count exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute count exceeded 2 at line 3(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> در سیاست XMLThreatProtection حاوی یک سند XML باشد که در آن تعداد ویژگی‌های یک عنصر از تعداد مشخص‌شده در عنصر <AttributeCountPerElement> در این سیاست بیشتر باشد.

برای مثال، اگر عنصر <AttributeCountPerElement> در ... برابر با 2 تعیین شده باشد. سیاست XMLThreatProtection، اما ورودی دارای عنصری با بیش از ۲ ویژگی است، در این صورت این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که تعداد ویژگی‌ها در آن از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XMLThreat-Protection-1 و شماره خط در payload برابر با 3 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    count exceeded 2 at line 3(possibly around char 105)
    
  2. سیاست ناموفق (که در مرحله 1 شناسایی شد) را بررسی کنید و مقدار مشخص شده در عنصر <AttributeCountPerElement> را یادداشت کنید.

    در مثال سیاست زیر، <AttributeCountPerElement> روی 2 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا تعداد ویژگی‌های مشخص شده از تعداد مشخص شده در عنصر <AttributeCountPerElementh> (که در مرحله ۲ مشخص شده است) بیشتر است یا خیر. اگر تعداد ویژگی‌ها از تعداد مشخص شده بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    فایل XML نشان داده شده در خط ۳ بالا دارای یک عنصر با سه ویژگی است. از آنجایی که تعداد ویژگی‌ها بیشتر از ۲ است (مقداری که برای عنصر <AttributeCountPerElement> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    count exceeded 2 at line 3(possibly around char 105)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از تعداد مشخصی ویژگی تجاوز می‌کنند، در نظر گرفته شده باشد، انتظار می‌رود پیام خطا نمایش داده شود. در این حالت، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دادید که تعداد بیشتری از ویژگی‌ها می‌توانند مجاز باشند، <AttributeCountPerElement> بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید تعدادی ویژگی برای هر عنصر تا سقف ۵ ویژگی مجاز کنید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

نام ویژگی از حد مجاز فراتر رفت

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Attribute name length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute name length exceeded 5 at line 3(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> سیاست XMLThreatProtection حاوی یک سند XML باشد که در آن نام ویژگی از تعداد کاراکترهای مشخص‌شده در عنصر فرزند <Attribute> از عنصر <NameLimits> سیاست بیشتر باشد.

برای مثال، اگر عنصر <Attribute> در سیاست به عنوان 5 مشخص شده باشد، اما نام ویژگی ورودی بیش از ۵ کاراکتر داشته باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که در آن طول نام ویژگی از حد مجاز تجاوز کرده است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload برابر 3 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    name length exceeded 5 at line 3(possibly around char 105)
    
  2. سیاست ناموفق (که در مرحله ۱ شناسایی شد) را بررسی کنید و مقدار مشخص شده در عنصر <Attribute> را یادداشت کنید.

    در مثال زیر از سیاست XMLThreatProtection، <Attribute> روی 5 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول ویژگی مشخص شده در آنجا دارای کاراکترهای بیشتری نسبت به تعداد مشخص شده در عنصر <Attribute> (که در مرحله ۲ مشخص شده است) است یا خیر. اگر تعداد کاراکترها از مقدار ویژگی بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    XML Payload نشان داده شده در خط ۳ بالا دارای دو ویژگی category و cuisine با طول نام به ترتیب ۸ و ۷ کاراکتر است . از آنجایی که طول نام ویژگی بیشتر از ۵ است (مقداری که برای عنصر <Attribute> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    name length exceeded 5 at line 3(possibly around char 105)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از طول نام ویژگی خاصی تجاوز می‌کنند، در نظر گرفته شده باشد، انتظار می‌رود پیام خطا ظاهر شود. در این حالت، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دادید که می‌توان طول نام ویژگی طولانی‌تری را مجاز دانست، <Attribute> بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید نام ویژگی‌ها را تا 10 کاراکتر داشته باشید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

مقدار ویژگی از حد مجاز فراتر رفت

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Attribute value length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Attribute value length exceeded 10 at line 3(possibly around char 111)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> خط‌مشی حاوی یک سند XML باشد که در آن مقدار یک ویژگی از تعداد کاراکترهای مشخص‌شده در عنصر فرزند <Attribute> از عنصر <ValueLimits> بیشتر باشد.

برای مثال، اگر عنصر <Attribute> در سیاست XMLThreatProtection با 10 مشخص شده باشد، اما مقدار ورودی دارای یک مقدار ویژگی با بیش از ۱۰ کاراکتر باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که تعداد ویژگی‌ها در آن از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload 3 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    value length exceeded 10 at line 3(possibly around char 111)
    
  2. سیاست ناموفق (که در مرحله 1 شناسایی شد) را بررسی کنید و مقدار مشخص شده در عنصر فرزند <Attribute> از عنصر <ValueLimits> را یادداشت کنید.

    در مثال زیر از سیاست XMLThreatProtection، <Attribute> روی 10 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول مقدار ویژگی مشخص شده در آنجا، کاراکترهای بیشتری نسبت به تعداد مشخص شده در عنصر <Attribute> (که در مرحله ۲ مشخص شده است) دارد یا خیر. اگر تعداد کاراکترها از مقدار ویژگی بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking" cuisine="South Indian" lang="en">
        <title>Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    </bookstore>
    

    XML Payload نشان داده شده در خط ۳ بالا دارای یک ویژگی (cuisine) با طول مقدار ۱۲ کاراکتر است. از آنجا که طول مقدار ویژگی بیشتر از ۱۰ است (مقداری که برای عنصر <Attribute> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Attribute
    value length exceeded 10 at line 3(possibly around char 111)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از طول مقدار ویژگی خاصی تجاوز می‌کنند، در نظر گرفته شده باشد، انتظار می‌رود پیام خطا ظاهر شود. در این حالت، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دادید که می‌توان از مقادیر طولانی‌تر برای ویژگی‌ها استفاده کرد، عنصر فرزند <Attribute> از عنصر <ValueLimits> را بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید مقادیری تا ۱۵ کاراکتر را نسبت دهید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

متن تجاوز شده

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Text length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Text length exceeded 15 at line 4(possibly around char 66)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> سیاست XMLThreatProtection حاوی یک سند XML باشد که طول متن یک عنصر از تعداد کاراکترهای مشخص‌شده در عنصر فرزند <Text> از عنصر <ValueLimits> این سیاست بیشتر باشد.

برای مثال، اگر عنصر <Text> در سیاست به عنوان 15 مشخص شده باشد، اما محتوای ورودی متنی با بیش از ۱۵ کاراکتر داشته باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که تعداد ویژگی‌ها در آن از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload برابر 4 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Text length
    exceeded 15 at line 4(possibly around char 66)
    
  2. سیاست شکست‌خورده (که در مرحله ۱ شناسایی شد) را بررسی کنید و مقدار مشخص‌شده در عنصر فرزند <Text> از عنصر <ValueLimits> را یادداشت کنید.

    در مثال زیر از سیاست XMLThreatProtection، <Text> برابر با 15 است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول مقدار ویژگی مشخص شده در آنجا، کاراکترهای بیشتری نسبت به تعداد مشخص شده در عنصر <Text> (که در مرحله ۲ مشخص شده است) دارد یا خیر. اگر تعداد کاراکترها از مقدار ویژگی بیشتر باشد، علت خطا همین است.

    <food>
      <name>Veg Sandwich</name>
      <price>$5.95</price>
      <description>Vegetarian Sandwich with onions, tomatoes and lettuce</description>
      <calories>650</calories>
    </food>
    

    XML Payload نشان داده شده در خط ۴ بالا، متنی با طول ۵۳ کاراکتر دارد. از آنجایی که مقدار ویژگی length بیشتر از ۱۵ است (مقداری که برای عنصر <Text> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Text length
    exceeded 15 at line 4(possibly around char 66)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از طول متن خاصی تجاوز می‌کنند در نظر گرفته شده باشد، انتظار می‌رود پیام خطا نمایش داده شود. در این مورد، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دادید که طول متن طولانی‌تر مجاز است، عنصر فرزند <Text> از عنصر <ValueLimits> را بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید مقادیر ویژگی تا ۶۰ کاراکتر داشته باشید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>60</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

نظرت تجاوز شد

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Comment length exceeded [num] at line [num](possibly around char
        [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Comment length exceeded 10 at line 2(possibly around char 48)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> در سیاست XMLThreatProtection حاوی یک سند XML باشد که طول نظر در آن از تعداد کاراکترهای مشخص‌شده در عنصر فرزند <Comment> از عنصر <ValueLimits> این سیاست بیشتر باشد.

برای مثال، اگر عنصر <Comment> در سیاست به عنوان 10 مشخص شده باشد، اما محتوای ورودی دارای کامنتی با بیش از 10 کاراکتر باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که طول کامنت در آن از حد مجاز تجاوز کرده است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload 2 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Comment length exceeded 10 at line 2(possibly around char 48)
    
  2. سیاست شکست‌خورده (که در مرحله ۱ شناسایی شد) را بررسی کنید و مقدار مشخص‌شده در عنصر فرزند <Comment> از عنصر <ValueLimits> را یادداشت کنید.

    در مثال زیر از سیاست XMLThreatProtection، <Comment> برابر با 10 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول کامنت مشخص شده در آنجا کاراکترهای بیشتری نسبت به تعداد مشخص شده در عنصر <Comment> (که در مرحله ۲ مشخص شده است) دارد یا خیر. اگر تعداد کاراکترها از مقدار ویژگی بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <food>
      <!--This is somewhat a long comment-->
      <name>Veg Sandwich</name>
      <price>$5.95</price>
      <description>Vegetarian Sandwich with onions, tomatoes and lettuce</description>
      <calories>650</calories>
    </food>
    

    فایل XML Payload که در خط ۲ بالا نشان داده شده است، دارای یک کامنت با طول ۳۱ کاراکتر است . از آنجایی که طول کامنت بیشتر از ۱۰ (مقداری که برای عنصر <Comment> مشخص شده است) است، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Comment length
    exceeded 10 at line 2(possibly around char 48)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از طول نظر خاصی تجاوز می‌کنند در نظر گرفته شده باشد، انتظار می‌رود پیام خطا ظاهر شود. در این مورد، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دادید که می‌توانید یک نظر طولانی‌تر بگذارید، عنصر فرزند <Comment> از عنصر <ValueLimits> را بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید مقادیری تا سقف ۴۰ کاراکتر را نسبت دهید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>40</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

PIDataExceeded

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Processing Instruction data length exceeded [num] at line
        [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Processing Instruction data length exceeded 30 at line 2(possibly around char 109)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده ورودی مشخص‌شده توسط عنصر <Source> در سیاست XMLThreatProtection حاوی یک سند XML باشد که در آن، تعداد کاراکترهای دستورالعمل پردازش داده از تعداد کاراکترهای مشخص‌شده در عنصر فرزند <ProcessingInstructionData> از عنصر <ValueLimits> این سیاست بیشتر باشد.

برای مثال، اگر عنصر <ProcessingInstructionData> در سیاست XMLThreatProtection با 10 مشخص شده باشد، اما محتوای ورودی دارای یک دستورالعمل پردازش با بیش از ۱۰ کاراکتر باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که در آن طول دستورالعمل پردازش از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload برابر 2 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction data length exceeded 30 at line 2(possibly around char 109)
    
  2. سیاست ناموفق (شناسایی شده در مرحله 1) را بررسی کنید و مقدار مشخص شده در عنصر فرزند <ProcessingInstructionData> از عنصر <ValueLimits> را یادداشت کنید.

    در مثال زیر از سیاست XMLThreatProtection، <ProcessingInstructionData> برابر با 30 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول داده‌های دستورالعمل پردازش مشخص شده در آنجا، کاراکترهای بیشتری نسبت به تعداد مشخص شده در عنصر <ProcessingInstructionData> (که در مرحله ۲ مشخص شده است) دارد یا خیر. اگر تعداد کاراکترها از داده‌های دستورالعمل پردازش بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet type="text/xsl" href="mobilephones.xsl"?>
    <mobilephones>
      <mobilephone>
          <name>iPhone</name>
          <price>$600</price>
      </mobilephone>
      <mobilephone>
          <name>Samsung</name>
          <price>$500</price>
      </mobilephone>
    </mobilephones>
    

    فایل XML نشان داده شده در خط ۱ در بالا، دارای یک عنصر داده دستورالعمل پردازش ( type="text/xsl" href="mobilephones.xsl"?) با طول ۴۰ کاراکتر است . از آنجایی که این طول بیشتر از ۳۰ (مقدار مشخص شده برای عنصر <ProcessingInstructionData> ) است، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction data length exceeded 30 at line 2(possibly around char 109)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از طول داده دستورالعمل پردازشی خاصی تجاوز می‌کنند، در نظر گرفته شده باشد، پیام خطا قابل انتظار است. در این مورد، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دهید که عناصر داده دستورالعمل پردازش طولانی‌تر می‌توانند مجاز باشند، عنصر فرزند <ProcessingInstructionData> از عنصر <ValueLimits> را بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید طول دستورالعمل‌های پردازش داده تا ۵۰ کاراکتر داشته باشید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>10</NamespaceURI>
        <Comment>40</Comment>
        <ProcessingInstructionData>50</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

PITargetExceeded

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Processing Instruction target length exceeded [num] at line [num](possibly around
        char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Processing Instruction target length exceeded 10 at line 2(possibly around char 114)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> سیاست XMLThreatProtection حاوی یک سند XML باشد که در آن هدف دستورالعمل فرآیند از تعداد کاراکترهای مشخص‌شده در عنصر فرزند <ProcessingInstructionTarget> از عنصر <NameLimits> این سیاست بیشتر باشد.

برای مثال، اگر عنصر <ProcessingInstructionTarget> در سیاست XMLThreatProtection با 10 مشخص شده باشد، اما محتوای ورودی دارای هدف دستورالعمل پردازش با بیش از ۱۰ کاراکتر باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که در آن تعداد دستورالعمل‌های پردازش از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload 1 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction target length exceeded 10 at line 2(possibly around char 114)
    
  2. سیاست XMLThreatProtection ناموفق (که در مرحله ۱ شناسایی شد) را بررسی کنید و به مقدار مشخص شده در عنصر فرزند <ProcessingInstructionTarget> از عنصر <NameLimits توجه کنید.

    در مثال زیر از سیاست XMLThreatProtection، <ProcessingInstructionTarget> برابر با 10 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول هدف دستورالعمل پردازش مشخص شده در آنجا، کاراکترهای بیشتری نسبت به تعداد مشخص شده در عنصر <ProcessingInstructionTarget> (که در مرحله ۲ مشخص شده است) دارد یا خیر. اگر تعداد کاراکترها از حد مجاز اندازه هدف بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet type="text/xsl" href="mobilephones.xsl"?>
    <mobilephones>
      <mobilephone>
          <name>iPhone</name>
          <price>$600</price>
      </mobilephone>
      <mobilephone>
          <name>Samsung</name>
          <price>$500</price>
      </mobilephone>
    </mobilephones>
    

    فایل XML Payload که در خط ۲ بالا نشان داده شده است، دارای نام هدف دستورالعمل پردازش " xml-stylesheet" با طول ۱۴ کاراکتر است. از آنجا که نام هدف دستورالعمل پردازش طولانی‌تر از ۱۰ است (مقداری که برای عنصر <ProcessingInstructionTarget> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Processing
    Instruction target length exceeded 10 at line 2(possibly around char 114)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از طول هدف دستورالعمل فرآیند خاصی فراتر می‌روند، در نظر گرفته شده باشد، انتظار می‌رود پیام خطا ظاهر شود. در این حالت، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دهید که هدف دستورالعمل فرآیند می‌تواند طولانی‌تر باشد، عنصر فرزند <ProcessingInstructionTarget> از عنصر <NameLimits> را بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید اهداف دستورالعمل فرآیند تا ۲۵ کاراکتر داشته باشید، سیاست را به صورت زیر تغییر دهید:

  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>15</NamespacePrefix>
    <ProcessingInstructionTarget>25</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
  </XMLThreatProtection>

NSURIمتجاوز

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]: Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:  Namespace uri length length exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Namespace uri length exceeded 10 at line 2(possibly around char 97)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> سیاست XMLThreatProtection حاوی یک سند XML باشد که در آن یک Namespace URI از تعداد کاراکترهای مشخص‌شده در عنصر فرزند <NamespaceURI> از عنصر <ValueLimits> این سیاست بیشتر باشد.

برای مثال، اگر عنصر <NamespaceURI> در سیاست به عنوان 10 مشخص شده باشد، اما محتوای ورودی دارای یک URI فضای نام با بیش از 10 کاراکتر باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که در آن طول فضای نام URI از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload 2 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    uri length exceeded 10 at line 2(possibly around char 97)
    
  2. سیاست شکست‌خورده (که در مرحله ۱ شناسایی شد) را بررسی کنید و به مقدار مشخص‌شده در عنصر فرزند <NamespaceURI> از عنصر <ValueLimits توجه کنید.

    در مثال زیر از سیاست XMLThreatProtection، <NamespaceURI> برابر با 10 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>5</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>2</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>15</Text>
            <Attribute>10</Attribute>
            <NamespaceURI>10</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>10</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول فضای نام URI مشخص شده در آنجا، کاراکترهای بیشتری نسبت به تعداد مشخص شده در عنصر <NamespaceURI> (که در مرحله ۲ مشخص شده است) دارد یا خیر. اگر تعداد کاراکترها از طول فضای نام URI بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version = "1.0" encoding = "UTF-8"?>
      <profile:user xmlns:profile = "www.google.com/profile">
      <profile:name>Rama Krishna</profile:name>
      <profile:company>Google</profile:company>
      <profile:phone>(91) 9876543210</profile:phone>
    </profile:user>
    

    XML Payload نشان داده شده در خط ۲ بالا دارای یک فضای نام URI به نام www.google.com/profile با طول ۲۲ کاراکتر است. از آنجایی که طول فضای نام URI بیشتر از ۱۰ است (مقداری که برای عنصر <NamespaceURI> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    uri length exceeded 10 at line 2(possibly around char 99)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از طول یک فضای نام خاص URI تجاوز کرده‌اند، در نظر گرفته شده باشد، انتظار می‌رود پیام خطا نمایش داده شود. در این مورد، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دهید که می‌توان از یک فضای نام URI طولانی‌تر استفاده کرد، عنصر فرزند <NamespaceURI> از عنصر <ValueLimits> را بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید طول URIهای فضای نام را تا 30 کاراکتر داشته باشید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>30</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NSPrefixExceeded

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Namespace prefix length exceeded [num] at line [num](possibly
        around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Namespace prefix length exceeded 10 at line 2(possibly around char 105)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> حاوی یک سند XML باشد که در آن پیشوند Namespace از تعداد کاراکترهای مشخص‌شده در عنصر فرزند <NamespacePrefix> از عنصر <NameLimits> خط‌مشی بیشتر باشد.

برای مثال، اگر عنصر <NamespacePrefix> در سیاست XMLThreatProtection با 10 مشخص شده باشد، اما محتوای ورودی دارای پیشوند فضای نامی با بیش از ۱۰ کاراکتر باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که در آن طول پیشوند URI فضای نام از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XML-Threat-Protection-1 و شماره خط در payload 2 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    prefix length exceeded 10 at line 2(possibly around char 105)
    
  2. سیاست ناموفق (که در مرحله ۱ شناسایی شد) را بررسی کنید و مقدار مشخص شده در عنصر فرزند <NamespacePrefix> از عنصر <NameLimits را یادداشت کنید.

    در مثال زیر از سیاست XMLThreatProtection، <NamespacePrefix> روی 10 تنظیم شده است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا طول پیشوند فضای نام مشخص شده در آنجا، کاراکترهای بیشتری نسبت به تعداد مشخص شده در عنصر <NamespacePrefix> (که در مرحله ۲ مشخص شده است) دارد یا خیر. اگر تعداد کاراکترها از حد مجاز پیشوند فضای نام بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version = "1.0" encoding = "UTF-8"?>
    <userprofile:user xmlns:userprofile = "www.googlecom/profile">
      <userprofile:name>Rama Krishna</userprofile:name>
      <userprofile:company>Google</userprofile:company>
      <userprofile:phone>(011) 123-4567</userprofile:phone>
    </userprofile:user>
    

    XML Payload نشان داده شده در خط ۲ بالا دارای پیشوند namespace به نام userprofile با طول ۱۱ کاراکتر است. از آنجایی که طول پیشوند namespace URI بیشتر از ۱۰ است (مقداری که برای عنصر <NamespacePrefix> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    prefix length exceeded 10 at line 2(possibly around char 105)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از طول پیشوند URI فضای نام خاصی تجاوز می‌کنند، در نظر گرفته شده باشد، انتظار می‌رود پیام خطا ظاهر شود. در این حالت، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دهید که می‌توان پیشوند URI فضای نام طولانی‌تری را مجاز دانست، عنصر فرزند <NamespacePrefix> از عنصر <NameLimits> را بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید پیشوند URI فضای نام را تا ۱۵ کاراکتر داشته باشید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>5</Attribute>
        <NamespacePrefix>15</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>2</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>15</Text>
        <Attribute>10</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>10</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

تعداد کاربران NSCount از حد مجاز فراتر رفت

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. reason: XMLThreatProtection stepDefinition [policy_name]:
        Namespace count exceeded [num] at line [num](possibly around char [num])",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed. reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace count exceeded 3 at line 2(possibly around char 234)",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص‌شده توسط عنصر <Source> سیاست XMLThreatProtection حاوی یک سند XML باشد که در آن تعداد فضاهای نام استفاده‌شده در یک عنصر واحد از تعداد مشخص‌شده در عنصر فرزند <NamespaceCountPerElement> از عنصر <StructureLimits> این سیاست بیشتر باشد.

برای مثال، اگر عنصر <NamespaceCountPerElement> در سیاست به عنوان 3 مشخص شده باشد، اما محتوای ورودی دارای عنصری با بیش از ۳ فضای نام باشد، این خطا رخ می‌دهد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاست XMLThreatProtection و شماره خطی که در آن تعداد فضاهای نام از حد مجاز فراتر رفته است را شناسایی کنید. برای مثال، در پیام خطای زیر، نام سیاست XMLThreat-Protection-1 و شماره خط در payload 2 است:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace count
    exceeded 3 at line 2(possibly around char 234)
    
  2. سیاست شکست‌خورده (که در مرحله ۱ شناسایی شد) را بررسی کنید و به مقدار مشخص‌شده در عنصر فرزند <NamespaceCountPerElement> از عنصر <StructureLimits توجه کنید.

    در مثال زیر از سیاست XMLThreatProtection، مقدار <NamespaceCountPerElement> برابر با 3 است:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>request</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    
  3. شماره خط خاص (که در مرحله ۱ مشخص شده است) از payload ورودی را بررسی کنید و بررسی کنید که آیا تعداد فضاهای نام مشخص شده در آنجا برای یک عنصر واحد بیشتر از تعداد مشخص شده در عنصر <NamespaceCountPerElement> (که در مرحله ۲ مشخص شده است) است یا خیر. اگر تعداد فضاهای نام از تعداد فضای نام در هر عنصر بیشتر باشد، علت خطا همین است.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version = "1.0" encoding = "UTF-8"?>
    <hellos xmlns:h="https://www.w3schools.com/greeting1" xmlns:a="https://www.w3schools.com/greeting2" xmlns:b="https://www.w3schols.com/greeting3" xmlns:c="https://www.w3schools.com/greeting4">
        <a:hello1>world1</a:hello1>
        <b:hello2>world2</b:hello2>
        <c:hello2>world2</c:hello2>
        <h:hello2>world2</h:hello2>
    </hellos>
    

    XML Payload نشان داده شده در خط ۲ بالا بیش از ۳ فضای نام دارد. از آنجایی که تعداد فضای نام بیشتر از ۳ است (مقداری که برای عنصر <NamespaceCountPerElement> مشخص شده است)، خطای زیر را دریافت می‌کنید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: XMLThreatProtection stepDefinition XML-Threat-Protection-1: Namespace
    count exceeded 3 at line 2(possibly around char 234)
    

وضوح تصویر

اگر سیاست XMLThreatProtection برای محافظت در برابر بارهای داده‌ای که از تعداد مشخصی فضای نام در یک عنصر تجاوز می‌کنند، در نظر گرفته شده باشد، در این صورت پیام خطا قابل انتظار است. در این حالت، هیچ اقدام اضافی لازم نیست.

با این حال، اگر تشخیص دهید که تعداد بیشتری از فضاهای نام مجاز هستند، عنصر فرزند <NamespaceCountPerElement> از عنصر <StructureLimits> را بر اساس نیازهای خود به مقدار مناسبی تغییر دهید.

برای مثال، اگر فکر می‌کنید می‌توانید تا ۵ فضای نام در یک عنصر داشته باشید، سیاست را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>5</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

بار داده نامعتبر XMLPayload

کد خطا

steps.xmlthreatprotection.ExecutionFailed

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition [policy_name]:
        Execution failed. Reason: [error_description]",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Execution failed. reason: Syntax error while parsing XML prologue",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.ExecutionFailed"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که بار داده پیام ورودی مشخص شده توسط عنصر <Source> در سیاست XMLProtectionPolicy یک سند XML معتبر نباشد.

تشخیص

  1. پیام خطا را بررسی کنید تا نام سیاستی که خطا در آن رخ داده است را شناسایی کنید. در مثال زیر نام سیاست XML-Threat-Protection-1 است.

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: Syntax error while parsing XML prologue
    
  2. بار داده ورودی را بررسی کنید و بررسی کنید که آیا سند XML ارسال شده در بار داده، واقعاً یک سند XML با ساختار مناسب است یا خیر.

    در اینجا یک نمونه از payload ورودی آورده شده است:

    <?xml version="1.0" encoding="UTF-8"?>
    <bookstore>
      <book category="cooking">
        <title lang="en">Easy Indian Cooking</title>
        <author>Suneeta</author>
        <year>2004</year>
        <price>300.00</price>
      </book>
    <bookstore>
    

    در فایل XML نشان داده شده در بالا، خط ۹ عنصر ریشه را به درستی نمی‌بندد زیرا / وجود ندارد. از آنجا که این XML به خوبی شکل نگرفته است، با خطای زیر مواجه می‌شوید:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: Syntax error while parsing XML prologue
    

وضوح تصویر

اطمینان حاصل کنید که یک ورودی XML معتبر به هر پروکسی API که شامل سیاست XMLThreatProtection است، ارسال می‌شود.

برای اصلاح خطای مثال بالا، فایل XML ورودی را به صورت زیر تغییر دهید:

<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
  <book category="cooking">
    <title lang="en">Easy Indian Cooking
    <author>Suneeta</author>
    <year>2004</year>
    <price>300.00</price>
  </book>
</bookstore>

منبع در دسترس نیست

کد خطا

steps.xmlthreatprotection.SourceUnavailable

متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition[policy_name]: Source[var_name] is not available"
        "detail": {
            "errorcode": "steps.xmlthreatprotection.SourceUnavailable"
        }
    }
}

مثال متن پاسخ خطا

{
    "fault": {
        "faultstring": "XMLThreatProtection stepDefinition XML-Threat-Protection-1:
        Source requests is not available",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.SourceUnavailable"
        }
    }
}

علت

این خطا زمانی رخ می‌دهد که متغیر پیام مشخص شده در عنصر <Source> از سیاست XMLThreatProtection یکی از موارد زیر باشد:

  • خارج از محدوده (در جریان خاصی که سیاست در آن اجرا می‌شود، در دسترس نیست)
  • یکی از مقادیر معتبر request ، response یا message نیست.

برای مثال، این خطا زمانی رخ می‌دهد که عنصر <Source> در سیاست روی متغیری تنظیم شده باشد که در جریان اجرای سیاست وجود نداشته باشد.

تشخیص

  1. Identify the XMLThreatProtection policy name, and the name of the Source variable from the error message. For example, in the following error message, the XMLThreatProtection policy name is XML-Threat-Protection-1 and the Source variable is requests:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Source requests
    is not available
    
  2. Examine the failed XMLThreatProtection policy and check the value specified for the <Source> element identified in Step 1.

    In the following XMLThreatProtection policy example, the <Source> element is set to requests .

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>requests</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    

    The valid values for <Source> element are request , response , or message. Because requests is not a valid value and doesn't exist in the flow where the policy is being executed, you get the error:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Source requests
    is not available
    

وضوح تصویر

Ensure that the variable set in the <Source> element of the failed XMLThreatProtection policy is set to either request , response , or message and exists in the flow where the policy executes.

To correct the example policy shown above, you could modify the <Source> element to use the request variable, because it exists in the request flow:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>request</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>

NonMessageVariable

کد خطا

steps.xmlthreatprotection.NonMessageVariable

Error response body

{
    "fault": {
        "faultstring": "Variable var_name does not resolve to a Message"
        "detail": {
            "errorcode": "steps.xmlthreatprotection.NonMessageVariable"
        }
    }
}

Example Error response body

{
    "fault": {
        "faultstring": "Variable message.content does not resolve to a Message",
        "detail": {
            "errorcode": "steps.xmlthreatprotection.NonMessageVariable"
        }
    }
}

علت

This error occurs if the <Source> element in the XMLThreatProtection policy is set to a variable which is not of type Message .

Message type variables represent entire HTTP requests and responses. The built-in Apigee Edge flow variables request , response , and message are of type Message. To learn more about message variables, see the Variables reference .

تشخیص

  1. Identify the name of the variable that does resolve to a Message type of variable from the error message. For example, in the following error message the name of variable is message.content

    Variable message.content does not resolve to a Message
    
  2. Examine all the XMLThreadProtection policies in the API proxy where the failure occurred and identify the specific XMLThreadProtection policy where <Source> element is specified with the variable name identified in Step 1 above.

    In the following XMLThreatProtection policy example, <Source> is set to message.content :

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
        <DisplayName>XML Threat Protection-1</DisplayName>
        <Properties/>
        <NameLimits>
            <Element>10</Element>
            <Attribute>10</Attribute>
            <NamespacePrefix>10</NamespacePrefix>
            <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
        </NameLimits>
        <Source>message.content</Source>
        <StructureLimits>
            <NodeDepth>10</NodeDepth>
            <AttributeCountPerElement>5</AttributeCountPerElement>
            <NamespaceCountPerElement>3</NamespaceCountPerElement>
            <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
        </StructureLimits>
        <ValueLimits>
            <Text>20</Text>
            <Attribute>15</Attribute>
            <NamespaceURI>40</NamespaceURI>
            <Comment>10</Comment>
            <ProcessingInstructionData>30</ProcessingInstructionData>
        </ValueLimits>
    </XMLThreatProtection>
    

    Because the variable message.content is not of type Message, you get the error:

    Variable message.content does not resolve to a Message
    

وضوح تصویر

Ensure that the <Source> element in the failed XMLThreatProtection policy is set to a Message type flow variable that exists in the flow where the policy executes.

To correct the policy, you can modify the <Source> element to specify a variable that is of type Message. For example, in the failed XMLThreatProtection you could specify the <Source> element as message :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLThreatProtection async="false" continueOnError="false" enabled="true" name="XML-Threat-Protection-1">
    <DisplayName>XML Threat Protection-1</DisplayName>
    <Properties/>
    <NameLimits>
        <Element>10</Element>
        <Attribute>10</Attribute>
        <NamespacePrefix>10</NamespacePrefix>
        <ProcessingInstructionTarget>10</ProcessingInstructionTarget>
    </NameLimits>
    <Source>message</Source>
    <StructureLimits>
        <NodeDepth>10</NodeDepth>
        <AttributeCountPerElement>5</AttributeCountPerElement>
        <NamespaceCountPerElement>3</NamespaceCountPerElement>
        <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
    </StructureLimits>
    <ValueLimits>
        <Text>20</Text>
        <Attribute>15</Attribute>
        <NamespaceURI>40</NamespaceURI>
        <Comment>10</Comment>
        <ProcessingInstructionData>30</ProcessingInstructionData>
    </ValueLimits>
</XMLThreatProtection>