การแก้ปัญหาเกี่ยวกับรันไทม์ของนโยบาย XMLThreatProtection

คุณกําลังดูเอกสารประกอบของ Apigee Edge
ไปที่ เอกสารประกอบเกี่ยวกับ Apigee X.
ข้อมูล

ExecutionFailed

รหัสข้อผิดพลาด

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 หลายประเภท ตารางด้านล่างแสดงรายการข้อผิดพลาดประเภทต่างๆ และสาเหตุที่เป็นไปได้

ข้อผิดพลาด สาเหตุ
ElementNameExceeded สตริง XML มีอักขระเกินจำนวนสูงสุดที่อนุญาต
ChildCountExceeded จำนวนองค์ประกอบย่อยสูงสุดที่อนุญาตในเพย์โหลด XML เกิน
NodeDepthExceeded ความลึกสูงสุดขององค์ประกอบ XML ที่อนุญาตในเพย์โหลด XML เกินกำหนด
AttributeCountExceeded จำนวนแอตทริบิวต์สูงสุดในองค์ประกอบเดียวเกิน
AttributeNameExceeded ชื่อแอตทริบิวต์มีความยาวเกินความยาวสูงสุด
AttributeValueExceeded เกินความยาวสูงสุดสำหรับค่าแอตทริบิวต์
TextExceeded ข้อความมีความยาวเกินความยาวสูงสุด
CommentExceeded เกินความยาวสูงสุดสำหรับความคิดเห็น
PIDataExceeded เกินความยาวของข้อมูลวิธีการประมวลผลที่อนุญาตแล้ว
PITargetExceeded เกินความยาวของชื่อคำสั่งสำหรับกระบวนการ
NSURIExceeded URL ของเนมสเปซยาวเกินความยาวของ URL ของเนมสเปซ
NSPrefixExceeded เกินความยาวของคำนำหน้าเนมสเปซ
NSCountExceeded จำนวนเนมสเปซที่ใช้ในองค์ประกอบเดียวเกินขีดจำกัด
เพย์โหลด XML ไม่ถูกต้อง เพย์โหลด XML ที่ป้อนไม่ถูกต้อง

ElementNameExceeded

รหัสข้อผิดพลาด

steps.xmlthreatprotection.ExecutionFailed

เนื้อหาการตอบกลับข้อผิดพลาด

การรับส่งข้อมูลรันไทม์แสดงผลโค้ดตอบกลับ 500 พร้อมข้อผิดพลาดต่อไปนี้

{
    "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> เป็น 5 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีองค์ประกอบที่มีอักขระมากกว่า 5 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection, หมายเลขบรรทัด และจำนวนอักขระที่เป็นไปได้ในเพย์โหลดอินพุตที่เกินความยาวขององค์ประกอบ

    ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1,หมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบหมายเลขบรรทัดที่เจาะจง (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวขององค์ประกอบในบรรทัดนั้นมากกว่าค่าที่ระบุสำหรับองค์ประกอบ <Element> (ระบุในขั้นตอนที่ 2) หรือไม่ หากความยาวขององค์ประกอบเกินค่านี้ ข้อผิดพลาดดังกล่าวก็จะเป็นสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <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 มีจุดประสงค์เพื่อป้องกันเพย์โหลดที่มีชื่อองค์ประกอบเกินค่าที่กำหนดไว้ ก็คาดหวังข้อความแสดงข้อผิดพลาดได้ ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณทราบว่าสามารถระบุองค์ประกอบที่ยาวขึ้นในเพย์โหลดโดยไม่มีผลกระทบใด ให้แก้ไข <Element> เป็นค่าที่เหมาะสมตามความต้องการของคุณ

ตัวอย่างเช่น หากคุณคิดว่าสามารถอนุญาตองค์ประกอบที่มีความยาวได้สูงสุด 10 ให้แก้ไขนโยบาย 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>

ChildCountExceeded

รหัสข้อผิดพลาด

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> คือ 3 แต่เพย์โหลด XML ของอินพุตมีองค์ประกอบที่มีองค์ประกอบย่อยมากกว่า 3 รายการ ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีจำนวนรายการเกิน ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบ <ChildCount>

    ในตัวอย่างนโยบายต่อไปนี้ ระบบตั้งค่า <ChildCount> เป็น 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>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. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุไว้ในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าจํานวนองค์ประกอบย่อย (รวมถึงความคิดเห็นทั้งหมด ฯลฯ) ในเพย์โหลดมากกว่าค่าที่ระบุไว้สําหรับองค์ประกอบ <ChildCount> หรือไม่ (ระบุไว้ในขั้นตอนที่ 2) หากจำนวนองค์ประกอบย่อยมากกว่าจำนวนองค์ประกอบย่อย นั่นก็คือสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

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

    ในเพย์โหลด XML ที่แสดงด้านบน บรรทัดที่ 5 มีองค์ประกอบย่อยที่ 4 <director> ขององค์ประกอบรูท <movie> เนื่องจากจำนวนองค์ประกอบย่อยในเพย์โหลด XML อินพุตมากกว่า 3 (ค่าที่ระบุไว้สำหรับองค์ประกอบ <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 มีไว้เพื่อปกป้องจากเพย์โหลดที่มีจํานวนองค์ประกอบย่อยเกินเกณฑ์ที่เฉพาะเจาะจง คุณก็ควรจะได้รับข้อความแสดงข้อผิดพลาด ในกรณีนี้ คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม

อย่างไรก็ตาม หากคุณพิจารณาว่าสามารถรวมองค์ประกอบย่อยจำนวนมากขึ้น (รวมถึงความคิดเห็น ฯลฯ) ไว้ในเพย์โหลดได้โดยไม่เกิดผลกระทบใดๆ ให้แก้ไข <ChildCount> เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าสามารถอนุญาตองค์ประกอบย่อยได้สูงสุด 10 รายการ ให้แก้ไขนโยบาย 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>

NodeDepthExceeded

รหัสข้อผิดพลาด

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 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุไว้ในขั้นตอนที่ 1) ของพายโหลดอินพุต และตรวจสอบว่าความลึกของโหนดที่ระบุมีจํานวนมากกว่าจํานวนที่กำหนดไว้ในองค์ประกอบ <NodeDepth> หรือไม่ (ระบุไว้ในขั้นตอนที่ 2) หากระดับขององค์ประกอบย่อย XML เกินจำนวนดังกล่าว นั่นก็คือสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <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 ที่แสดงด้านบนในบรรทัด 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>

AttributeCountExceeded

รหัสข้อผิดพลาด

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 แต่เพย์โหลดอินพุตมีองค์ประกอบที่มีแอตทริบิวต์มากกว่า 2 รายการ ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีจำนวนแอตทริบิวต์เกินกำหนด ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XMLThreat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบหมายเลขบรรทัดที่เจาะจง (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าจำนวนแอตทริบิวต์ที่ระบุเกินจำนวนที่ระบุไว้ในองค์ประกอบ <AttributeCountPerElementh> หรือไม่ (ระบุในขั้นตอนที่ 2) หากจำนวนของแอตทริบิวต์มากกว่าจำนวนดังกล่าว นี่อาจเป็นสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบนในบรรทัด 3 มีองค์ประกอบที่มีแอตทริบิวต์ 3 รายการ เนื่องจากจำนวนแอตทริบิวต์มากกว่า 2 (ค่าที่ระบุสำหรับองค์ประกอบ <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> เป็นค่าที่เหมาะสมตามความต้องการของคุณ

ตัวอย่างเช่น หากคุณคิดว่าสามารถอนุญาตให้มีแอตทริบิวต์ต่อองค์ประกอบได้สูงสุด 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>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>

AttributeNameExceeded

รหัสข้อผิดพลาด

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 ในนโยบาย แต่เพย์โหลดอินพุตมีชื่อแอตทริบิวต์ที่มีอักขระมากกว่า 5 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีความยาวชื่อแอตทริบิวต์เกินขีดจำกัด ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบ <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. ตรวจสอบหมายเลขบรรทัด (ระบุไว้ในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของแอตทริบิวต์ที่ระบุมีอักขระมากกว่าจำนวนที่ระบุไว้ในองค์ประกอบ <Attribute> (ระบุไว้ในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินกว่าค่าแอตทริบิวต์ นั่นเป็นสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบนในบรรทัดที่ 3 มีแอตทริบิวต์ 2 รายการคือ category และ cuisine ที่มีชื่อยาว 8 และ 7 อักขระตามลำดับ. เนื่องจากชื่อแอตทริบิวต์มีความยาวมากกว่า 5 (ค่าที่ระบุสำหรับองค์ประกอบ <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>

AttributeValueExceeded

รหัสข้อผิดพลาด

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> เป็น 10 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีค่าแอตทริบิวต์ที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีจำนวนแอตทริบิวต์เกิน ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบหมายเลขบรรทัดที่เจาะจง (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของค่าแอตทริบิวต์ที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <Attribute> หรือไม่ (ระบุในขั้นตอนที่ 2) หากจํานวนของอักขระเกินค่าแอตทริบิวต์ แสดงว่านี่อาจเป็นสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบนในบรรทัด 3 มีแอตทริบิวต์ (cuisine) ที่มีความยาวค่า 12 อักขระ เนื่องจากความยาวของค่าแอตทริบิวต์มากกว่า 10 (ค่าที่ระบุไว้สำหรับองค์ประกอบ <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> เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าสามารถระบุแหล่งที่มาของค่าได้สูงสุด 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>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>

TextExceeded

รหัสข้อผิดพลาด

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 ในนโยบาย แต่เพย์โหลดอินพุตมีข้อความที่มีอักขระมากกว่า 15 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่เกินจำนวนแอตทริบิวต์ ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบนโยบายที่ไม่ผ่าน (ระบุไว้ในขั้นตอนที่ 1) และจดค่าที่ระบุไว้ในองค์ประกอบย่อย <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. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุไว้ในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของค่าแอตทริบิวต์ที่ระบุในนั้นมีค่าอักขระมากกว่าจำนวนที่ระบุไว้ในองค์ประกอบ <Text> (ระบุไว้ในขั้นตอนที่ 2) หรือไม่ หากจำนวนอักขระเกินกว่าค่าแอตทริบิวต์ นั่นเป็นสาเหตุของข้อผิดพลาด

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

    เพย์โหลด XML ที่แสดงด้านบนในบรรทัดที่ 4 มีข้อความที่มีความยาว 53 อักขระ เนื่องจากความยาวของค่าแอตทริบิวต์มากกว่า 15 (ค่าที่ระบุสำหรับองค์ประกอบ <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> ให้มีค่าที่เหมาะสมตามความต้องการของคุณ

ตัวอย่างเช่น หากคุณคิดว่าค่าแอตทริบิวต์มีความยาวได้สูงสุด 60 อักขระ ให้แก้ไขนโยบายดังนี้

<?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>

CommentExceeded

รหัสข้อผิดพลาด

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 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <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. ตรวจสอบหมายเลขบรรทัดที่เจาะจง (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของความคิดเห็นที่ระบุไว้มีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <Comment> หรือไม่ (ระบุในขั้นตอนที่ 2) หากจํานวนของอักขระเกินค่าแอตทริบิวต์ แสดงว่านี่อาจเป็นสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <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 ที่แสดงด้านบนในบรรทัด 2 มีความคิดเห็นที่มีความยาวค่า 31 อักขระ. เนื่องจากความยาวของความคิดเห็นมากกว่า 10 (ค่าที่ระบุสำหรับองค์ประกอบ <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>เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคุณคิดว่าสามารถระบุแหล่งที่มาของค่าได้สูงสุด 40 อักขระ ให้แก้ไขนโยบายดังนี้

<?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> เป็น 10 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีวิธีการประมวลผลที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีความยาวเกินวิธีการประมวลผล ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบหมายเลขบรรทัดที่เจาะจง (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของข้อมูลวิธีการประมวลผลที่ระบุไว้มีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <ProcessingInstructionData> หรือไม่ (ระบุในขั้นตอนที่ 2) หากจำนวนอักขระเกินกว่าข้อมูลวิธีการประมวลผล นั่นเป็นสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบนในบรรทัด 1 มีองค์ประกอบข้อมูลคำสั่งการประมวลผล (type="text/xsl" href="mobilephones.xsl"?)ที่มีความยาว 40 อักขระ.) เนื่องจากความยาวนี้มากกว่า 30 (ค่าที่ระบุสำหรับองค์ประกอบ <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> ให้เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

เช่น หากคิดว่ามีความยาววิธีการประมวลผลข้อมูลได้สูงสุด 50 อักขระ ให้แก้ไขนโยบายดังนี้

<?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> เป็น 10 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีเป้าหมายคำสั่งการประมวลผลที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่เกินเป้าหมายวิธีการประมวลผล ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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 ที่ดำเนินการไม่สำเร็จ (ระบุไว้ในขั้นตอนที่ 1) และจดค่าที่ระบุไว้ในองค์ประกอบย่อย <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. ตรวจสอบหมายเลขบรรทัดที่เจาะจง (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุต และตรวจสอบว่าความยาวของเป้าหมายคำสั่งการประมวลผลที่ระบุไว้มีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <ProcessingInstructionTarget> หรือไม่ (ระบุในขั้นตอนที่ 2) หากจำนวนอักขระเกินขีดจำกัดขนาดเป้าหมาย นั่นก็คือสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบนในบรรทัดที่ 2 มีชื่อเป้าหมายวิธีการประมวลผลเป็น "xml-stylesheet"" ที่มีความยาว 14 อักขระ เนื่องจากชื่อเป้าหมายของคำสั่งการประมวลผลยาวเกิน 10 (ค่าที่ระบุสำหรับองค์ประกอบ <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> เป็นค่าที่เหมาะสมตามข้อกำหนดของคุณ

ตัวอย่างเช่น หากคิดว่าคุณสามารถกำหนดเป้าหมายคำสั่งกระบวนการได้สูงสุด 25 อักขระ ให้แก้ไขนโยบายดังนี้

  <?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>

NSURIExceeded

รหัสข้อผิดพลาด

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 ที่ URI ของ Namespace ยาวเกินจำนวนอักขระที่ระบุในองค์ประกอบย่อย <NamespaceURI> ของ<ValueLimits>เอลิเมนต์ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <NamespaceURI> ในนโยบายเป็น 10 แต่เพย์โหลดอินพุตมี URI ของเนมสเปซที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่เกินความยาวของ URI ของเนมสเปซ ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบนโยบายที่ไม่ผ่าน (ระบุไว้ในขั้นตอนที่ 1) และจดค่าที่ระบุไว้ในองค์ประกอบย่อย <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. ตรวจสอบหมายเลขบรรทัดที่เจาะจง (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุตและตรวจสอบว่าความยาวของเนมสเปซ URI ที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <NamespaceURI> หรือไม่ (ระบุในขั้นตอนที่ 2) หากจำนวนอักขระเกินความยาวของ URI ของเนมสเปซ นั่นก็คือสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบนในบรรทัด 2 มี URI เนมสเปซ www.google.com/profile ยาว 22 อักขระ เนื่องจาก URI เนมสเปซมีความยาวมากกว่า 10 (ค่าที่ระบุสำหรับองค์ประกอบ <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 ที่คำนำหน้าเนมสเปซมีจำนวนอักขระเกินกว่าที่ระบุไว้ในองค์ประกอบย่อย <NamespacePrefix> ขององค์ประกอบ <NameLimits> ของนโยบาย

ตัวอย่างเช่น หากระบุองค์ประกอบ <NamespacePrefix> เป็น 10 ในนโยบาย XMLThreatProtection แต่เพย์โหลดอินพุตมีคำนำหน้าเนมสเปซที่มีอักขระมากกว่า 10 ตัว ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่เกินความยาวของคำนำหน้า URI ของเนมสเปซ ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XML-Threat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบนโยบายที่ไม่ผ่าน (ระบุไว้ในขั้นตอนที่ 1) และจดค่าที่ระบุไว้ในองค์ประกอบย่อย <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. ตรวจสอบหมายเลขบรรทัดที่เจาะจง (ระบุในขั้นตอนที่ 1) ของเพย์โหลดอินพุตและตรวจสอบว่าความยาวของคำนำหน้าเนมสเปซที่ระบุมีอักขระมากกว่าตัวเลขที่ระบุในองค์ประกอบ <NamespacePrefix> หรือไม่ (ระบุในขั้นตอนที่ 2) หากจำนวนอักขระเกินขีดจำกัดของคำนำหน้าเนมสเปซ นี่เองคือสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบนในบรรทัด 2 มีคำนำหน้าเนมสเปซ userprofile ที่มีความยาว 11 อักขระ เนื่องจากความยาวของคำนำหน้า URI ของเนมสเปซมากกว่า 10 (ค่าที่ระบุสำหรับองค์ประกอบ <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 ของเนมสเปซมีความยาวได้สูงสุด 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>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>

NSCountExceeded

รหัสข้อผิดพลาด

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 แต่เพย์โหลดอินพุตมีองค์ประกอบที่มีเนมสเปซมากกว่า 3 รายการ ระบบจะแสดงข้อผิดพลาดนี้

การวินิจฉัย

  1. ตรวจสอบข้อความแสดงข้อผิดพลาดเพื่อระบุชื่อนโยบาย XMLThreatProtection และหมายเลขบรรทัดที่มีจำนวนเนมสเปซเกิน ตัวอย่างเช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบายคือ XMLThreat-Protection-1 และหมายเลขบรรทัดในเพย์โหลดคือ 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. ตรวจสอบนโยบายที่ล้มเหลว (ระบุในขั้นตอนที่ 1) และจดบันทึกค่าที่ระบุในองค์ประกอบย่อย <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. ตรวจสอบหมายเลขบรรทัดเฉพาะ (ระบุไว้ในขั้นตอนที่ 1) ของพายโหลดอินพุต และตรวจสอบว่าจํานวนเนมสเปซที่ระบุไว้สําหรับองค์ประกอบเดียวสูงกว่าจํานวนที่กำหนดไว้ในองค์ประกอบ <NamespaceCountPerElement> หรือไม่ (ระบุไว้ในขั้นตอนที่ 2) หากจำนวนของเนมสเปซเกินกว่าจำนวนเนมสเปซต่อองค์ประกอบที่จำกัดไว้ นั่นจึงเป็นสาเหตุของข้อผิดพลาด

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบนในบรรทัด 2 มีเนมสเปซมากกว่า 3 รายการ เนื่องจากจํานวนเนมสเปซมากกว่า 3 (ค่าที่ระบุสําหรับองค์ประกอบ <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> เป็นค่าที่เหมาะสมตามข้อกําหนดของคุณ

ตัวอย่างเช่น หากคิดว่าคุณมีเนมสเปซได้สูงสุด 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>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>

InvalidXMLPayload

รหัสข้อผิดพลาด

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 ที่มีรูปแบบถูกต้องจริงหรือไม่

    ตัวอย่างเพย์โหลดอินพุตมีดังนี้

    <?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 ที่แสดงด้านบน บรรทัดที่ 9 ไม่ได้ปิดองค์ประกอบรูทอย่างถูกต้องเนื่องจากไม่มี / เนื่องจากไม่ได้อยู่ในรูปแบบ 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>

SourceUnavailable

รหัสข้อผิดพลาด

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"
        }
    }
}

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากตัวแปร message ที่ระบุในองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection มีลักษณะดังนี้

  • อยู่นอกขอบเขต (ไม่พร้อมใช้งานในขั้นตอนที่นโยบายจะทำงาน)
  • ไม่ใช่ค่าที่ถูกต้องอย่างใดอย่างหนึ่งต่อไปนี้ request, response หรือ message

ตัวอย่างเช่น ข้อผิดพลาดนี้จะเกิดขึ้นหากมีการตั้งค่าองค์ประกอบ <Source> ในนโยบายเป็นตัวแปรที่ไม่อยู่ในขั้นตอนที่มีการบังคับใช้นโยบาย

การวินิจฉัย

  1. ระบุชื่อนโยบาย XMLThreatProtection และชื่อตัวแปร Source จากข้อความแสดงข้อผิดพลาด เช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อนโยบาย XMLThreatProtection คือ XML-Threat-Protection-1 และตัวแปรแหล่งที่มาคือ requests:

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Source requests
    is not available
    
  2. ตรวจสอบนโยบาย XMLThreatProtection ที่ล้มเหลวและตรวจสอบค่าที่ระบุสำหรับองค์ประกอบ <Source> ที่ระบุในขั้นตอนที่ 1

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ องค์ประกอบ <Source> ได้รับการตั้งค่าเป็น 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>
    

    ค่าที่ถูกต้องสำหรับองค์ประกอบ <Source> คือ request, response หรือ message. เนื่องจาก requests ไม่ใช่ค่าที่ถูกต้องและไม่อยู่ในขั้นตอนที่มีการบังคับใช้นโยบาย คุณจึงได้รับข้อผิดพลาด

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

ความละเอียด

ตรวจสอบว่าตัวแปรที่ตั้งค่าไว้ในองค์ประกอบ <Source> ของนโยบาย XMLThreatProtection ที่ดำเนินการไม่สำเร็จได้รับการตั้งค่าเป็น request, response หรือ message และอยู่ในโฟลว์ที่นโยบายทำงาน

ในการแก้ไขนโยบายตัวอย่างที่แสดงด้านบน คุณสามารถแก้ไของค์ประกอบ <Source> ให้ใช้ตัวแปร request เนื่องจากมีอยู่ในขั้นตอนคำขอ

<?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

เนื้อหาการตอบกลับข้อผิดพลาด

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

ตัวอย่างเนื้อหาการตอบกลับข้อผิดพลาด

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

สาเหตุ

ข้อผิดพลาดนี้เกิดขึ้นหากองค์ประกอบ <Source> ในนโยบาย XMLThreatProtection ได้รับการตั้งค่าเป็นตัวแปรที่ไม่ใช่ประเภท Message

ตัวแปรประเภทข้อความแสดงคำขอ HTTP และการตอบกลับทั้งหมด ตัวแปรโฟลว์ Apigee Edge ในตัว request, response และ message เป็นประเภทข้อความ ดูข้อมูลเพิ่มเติมเกี่ยวกับตัวแปรข้อความได้ที่ข้อมูลอ้างอิงตัวแปร

การวินิจฉัย

  1. ระบุชื่อตัวแปรที่แก้ไขเป็นตัวแปรประเภทข้อความจากข้อความแสดงข้อผิดพลาด เช่น ในข้อความแสดงข้อผิดพลาดต่อไปนี้ ชื่อของตัวแปรคือ message.content

    Variable message.content does not resolve to a Message
    
  2. ตรวจสอบนโยบาย XMLThreadProtection ทั้งหมดในพร็อกซี API ที่เกิดความล้มเหลว และระบุนโยบาย XMLThreadProtection ที่เฉพาะเจาะจงซึ่งระบุองค์ประกอบ <Source> ด้วยชื่อตัวแปรที่ระบุไว้ในขั้นตอนที่ 1 ด้านบน

    ในตัวอย่างนโยบาย XMLThreatProtection ต่อไปนี้ <Source> ได้รับการตั้งค่าเป็น 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>
    

    เนื่องจากตัวแปร message.content ไม่ใช่ประเภท Message คุณจึงได้รับข้อผิดพลาด

    Variable message.content does not resolve to a Message
    

ความละเอียด

ตรวจสอบว่าองค์ประกอบ <Source> ในนโยบาย XMLThreatProtection ที่ล้มเหลวมีการตั้งค่าเป็นตัวแปรโฟลว์ประเภท Message ที่มีอยู่ในโฟลว์ที่นโยบายทำงาน

หากต้องการแก้ไขนโยบาย คุณสามารถแก้ไของค์ประกอบ <Source> เพื่อระบุตัวแปรที่เป็นประเภทข้อความ ตัวอย่างเช่น ใน XMLThreatProtection ที่ล้มเหลว คุณสามารถระบุองค์ประกอบ <Source> เป็น 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>