פתרון בעיות בזמן ריצה של מדיניות XMLThreatProtection

אתם צופים במסמכי העזרה של Apigee Edge.
כניסה למסמכי העזרה של Apigee X.
info

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 יכולה לגרום לסוגים שונים של שגיאות ביצוע שנכשלו. בטבלה הבאה מפורטים סוגי השגיאות השונים והסיבות האפשריות להן:

שגיאה סיבה
ElementNameExceeded יש חריגה מאורך המחרוזת המקסימלי המותר בתג XML.
ChildCountExceeded יש חריגה מהמספר המקסימלי של רכיבי צאצא שמותרים במטען ייעודי (payload) של XML.
NodeDepthExceeded יש חריגה מהעומק המקסימלי של רכיבי XML שמותר במטען ייעודי (payload) של XML.
AttributeCountExceeded חלה חריגה ממספר המאפיינים המקסימלי לרכיב יחיד.
AttributeNameExceeded יש חריגה מהאורך המקסימלי המותר לשם מאפיין.
AttributeValueExceeded יש חריגה מהאורך המקסימלי המותר לערך מאפיין.
TextExceeded חרגתם מהאורך המקסימלי המותר לטקסט.
CommentExceeded חרגתם מהאורך המקסימלי של התגובה.
PIDataExceeded חרגת מאורך הנתונים של הוראות העיבוד המותר.
PITargetExceeded חרגתם מאורך השם המרבי של הוראות התהליך.
NSURIExceeded יש חריגה מאורך כתובת ה-URL של מרחב השמות.
NSPrefixExceeded חרגתם מהאורך המקסימלי של קידומת מרחב השמות.
NSCountExceeded חרגתם ממספר מרחב השמות שאפשר להשתמש בהם ברכיב יחיד.
Invalid XML Payload המטען הייעודי (payload) שהוזן ב-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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הקלט שצוין על ידי הרכיב <Source> של המדיניות מכיל רכיבי XML שחורגים מהאורך המקסימלי שצוין ברכיב <Element> מתחת לרכיב <NameLimits>.

לדוגמה, אם הרכיב <Element> מצוין בתור 5 במדיניות XMLThreatProtection, אבל המטען הייעודי (Payload) של הקלט מכיל רכיב שמכיל יותר מ-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. בודקים את מספר השורה הספציפי (שזוהה בשלב 1) של עומס העבודה להזנה, ובודקים אם אורך הרכיב בשורה הזו גדול מהערך שצוין לרכיב <Element> (שזוהה בשלב 2). אם אורך הרכיב חורג מהערך הזה, זו הסיבה לשגיאה.

    הנה דוגמה למטען ייעודי (payload) של קלט:

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

    המטען הייעודי (payload) של 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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין על ידי הרכיב <Source> מכיל רכיב XML שמכיל יותר רכיבי צאצא מהערך שצוין ברכיב <ChildCount> של המדיניות.

לדוגמה, אם הערך של <ChildCount> הוא 3, אבל בעומס העבודה של קלט ה-XML יש אלמנט עם יותר מ-3 רכיבי צאצא, תופיע השגיאה הזו.

אבחון

  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. יש לבדוק את המדיניות שנכשלה (זוהתה בשלב 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) של המטען הייעודי (payload) של הקלט ובודקים אם מספר רכיבי הצאצא (כולל כל ההערות וכו') במטען הייעודי (Payload) גדול מהערך שצוין לרכיב <ChildCount> (שזוהה בשלב 2). אם מספר רכיבי הצאצא חורג ממספר הצאצא, זו הסיבה לשגיאה.

    הנה דוגמה למטען ייעודי (payload) של קלט:

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

    במטען הייעודי (payload) של XML שמוצג למעלה, שורה 5 מכילה רכיב צאצא רביעי <director>של רכיב הבסיס <movie>. מאחר שמספר רכיבי הצאצא ב-payload של הקלט ב-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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין על ידי הרכיב <Source> מכיל מסמך XML שבו היררכיית הצמתים חורגת מהמספר שצוין ברכיב <NodeDepth> של מדיניות XMLThreatProtection.

לדוגמה, אם הרכיב <NodeDepth> מצוין כ-4 במדיניות, אבל למטען הייעודי (Payload) של הקלט יש עומק צומת גדול מ-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) של המטען הייעודי (payload) של הקלט ובודקים אם עומק הצומת שצוין מכיל מספר גבוה יותר מהמספר שצוין ברכיב <NodeDepth> (שזוהה בשלב 2). אם רמת רכיבי הצאצא של ה-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 שמוצג למעלה בשורה 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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין ברכיב <Source> של מדיניות XMLThreatProtection מכיל מסמך XML שבו מספר המאפיינים של רכיב יחיד חורג מהמספר שצוין ברכיב <AttributeCountPerElement> של המדיניות.

לדוגמה, אם רכיב <AttributeCountPerElement> צוין כ-2 במדיניות XMLThreatProtection, אבל במטען הייעודי (payload) של הקלט יש רכיב עם יותר מ-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) של המטען הייעודי (payload) של הקלט ובודקים אם מספר המאפיינים שצוין חורג מהמספר שצוין ברכיב <AttributeCountPerElementh> (שזוהה בשלב 2). אם מספר המאפיינים גדול ממספר המאפיינים, זו הסיבה לשגיאה.

    הנה דוגמה למטען ייעודי (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>
    

    המטען הייעודי (payload) של XML שמוצג למעלה בשורה 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 נועדה להגן מפני מטענים ייעודיים (payloads) שחורגים ממספר מאפיינים ספציפי, הודעת השגיאה אמורה להופיע. במקרה כזה, אין צורך לבצע פעולה נוספת.

עם זאת, אם אתם קובעים שאפשר לאפשר מספר גדול יותר של מאפיינים, צריך לשנות את הערך של <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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין ברכיב <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) של המטען הייעודי (payload) של הקלט ובודקים אם אורך המאפיין שצוין כולל יותר תווים מהמספר שצוין ברכיב <Attribute> (שזוהה בשלב 2). אם מספר התווים חורג מערך המאפיין, זו הסיבה לשגיאה.

    הנה דוגמה למטען ייעודי (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 שמוצג למעלה בשורה 3 יש שני מאפיינים, 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 נועדה להגן מפני מטענים ייעודיים (payloads) שחורגים מאורך שם של מאפיין ספציפי, הודעת השגיאה אמורה להופיע. במקרה כזה, לא נדרשת פעולה נוספת.

עם זאת, אם אתם קובעים שאפשר לאפשר אורך ארוך יותר של שם המאפיין, צריך לשנות את <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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין על ידי הרכיב <Source> של המדיניות מכיל מסמך XML שבו ערך המאפיין חורג ממספר התווים שצוין ברכיב הצאצא <Attribute> של הרכיב <ValueLimits>.

לדוגמה, אם רכיב <Attribute> צוין כ-10 במדיניות 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. בודקים את מספר השורה הספציפי (שזוהה בשלב 1) של עומס העבודה להזנה, ובודקים אם אורך ערך המאפיין שצוין שם מכיל יותר תווים מהמספר שצוין באלמנט <Attribute> (שזוהה בשלב 2). אם מספר התווים חורג מערך המאפיין, זו הסיבה לשגיאה.

    הנה דוגמה למטען ייעודי (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 שמוצג למעלה בשורה 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 נועדה להגן מפני עומסי עבודה (payloads) שחורגים מאורך ספציפי של ערך מאפיין, הודעת השגיאה צפויה. במקרה כזה, אין צורך לבצע פעולה נוספת.

עם זאת, אם תחליטו שמותר להוסיף ערכי מאפיינים ארוכים יותר, תצטרכו לשנות את <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 במדיניות, אבל המטען הייעודי (Payload) של הקלט מכיל טקסט עם יותר מ-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. בודקים את המדיניות שנכשלה (שזוהתה בשלב 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) של המטען הייעודי (payload) של הקלט ולבדוק אם האורך של ערך המאפיין שצוין כולל יותר תווים מהמספר שצוין ברכיב <Text> (שזוהה בשלב 2). אם מספר התווים חורג מערך המאפיין, זו הסיבה לשגיאה.

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

    המטען הייעודי (Payload) של ה-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 נועדה להגן מפני מטענים ייעודיים (payloads) שחורגים מאורך טקסט ספציפי, הודעת השגיאה אמורה להופיע. במקרה כזה, אין צורך לבצע פעולה נוספת.

עם זאת, אם קבעתם שמותר טקסט ארוך יותר, צריך לשנות את <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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין ברכיב <Source> של מדיניות XMLThreatProtection מכיל מסמך XML שבו אורך ההערה חורג ממספר התווים שצוין ברכיב הצאצא <Comment> של הרכיב <ValueLimits> של המדיניות.

לדוגמה, אם הרכיב <Comment> מצוין בתור 10 במדיניות, אבל המטען הייעודי (Payload) של הקלט כולל תגובה עם יותר מ-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) של המטען הייעודי (payload) של הקלט ובודקים אם אורך התגובה שצוינה כולל יותר תווים מהמספר שצוין ברכיב <Comment> (שזוהה בשלב 2). אם מספר התווים חורג מערך המאפיין, זו הסיבה לשגיאה.

    דוגמה למטען ייעודי (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>
    

    המטען הייעודי (Payload) של ה-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 נועדה להגן מפני עומסי עבודה (payload) שחורגים מאורך תגובה ספציפי, הודעת השגיאה צפויה. במקרה כזה, לא נדרשת פעולה נוספת.

עם זאת, אם תחליטו שמותר להוסיף תגובה ארוכה יותר, עליכם לשנות את <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) של המטען הייעודי (payload) של הקלט ובודקים אם אורך הנתונים של הוראות העיבוד שצוין כולל יותר תווים מהמספר שצוין ברכיב <ProcessingInstructionData> (שזוהה בשלב 2). אם מספר התווים חורג מנתוני הוראות העיבוד, זו הסיבה לשגיאה.

    דוגמה למטען ייעודי (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>
    

    המטען הייעודי (payload) של 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 נועדה להגן מפני עומסי עבודה (payloads) שחורגים מאורך נתונים ספציפי של הוראות עיבוד, הודעת השגיאה צפויה. במקרה כזה, לא נדרשת פעולה נוספת.

עם זאת, אם קבעתם שמותר להשתמש ברכיבי נתונים של הוראה ארוכה יותר, צריך לשנות את רכיב הצאצא <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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין ברכיב <Source> של מדיניות XMLThreatProtection מכיל מסמך XML שבו יעד של הוראות תהליך חורג ממספר התווים שצוין ברכיב הצאצא <ProcessingInstructionTarget> של רכיב <NameLimits> במדיניות.

לדוגמה, אם האלמנט <ProcessingInstructionTarget> מצוין כ-10 במדיניות 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 שנכשלה (זוהתה בשלב 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) של המטען הייעודי (payload) של הקלט ובודקים אם האורך של יעד הוראות העיבוד שצוין כולל יותר תווים מהמספר שצוין ברכיב <ProcessingInstructionTarget> (שזוהה בשלב 2). אם מספר התווים חורג ממגבלת גודל היעד, זו הסיבה לשגיאה.

    הנה דוגמה למטען ייעודי (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 שמוצג למעלה בשורה 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 נועדה להגן מפני מטענים ייעודיים (payloads) שחורגים מאורך יעד של הוראות תהליך ספציפיות, הודעת השגיאה אמורה להופיע. במקרה כזה, אין צורך לבצע פעולה נוספת.

עם זאת, אם קבעתם שיעד ההוראות בתהליך יכול להיות ארוך יותר, עליכם לשנות את <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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין ברכיב <Source> של מדיניות XMLThreatProtection מכיל מסמך XML שבו URI של מרחב שמות חורג ממספר התווים שצוין ברכיב הצאצא <NamespaceURI> של רכיב <ValueLimits> במדיניות.

לדוגמה, אם הרכיב <NamespaceURI> מצוין במדיניות בתור 10, אבל למטען הייעודי (Payload) של הקלט יש 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 של מרחב השמות, זו הסיבה לשגיאה.

    דוגמה למטען ייעודי (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>
    

    למטען הייעודי (Payload) של ה-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 נועדה להגן מפני עומסי עבודה (payloads) שחורגים מאורך 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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין על ידי הרכיב <Source> מכיל מסמך XML שבו קידומת של מרחב שמות חורגת ממספר התווים שצוין ברכיב הצאצא <NamespacePrefix> של הרכיב <NameLimits> של המדיניות.

לדוגמה, אם הרכיב <NamespacePrefix> מצוין כ-10 במדיניות XMLThreatProtection, אבל למטען הייעודי (Payload) של הקלט יש קידומת של מרחב שמות עם יותר מ-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). אם מספר התווים חורג ממגבלת הקידומת של מרחב השמות, זו הסיבה לשגיאה.

    דוגמה למטען ייעודי (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>
    

    למטען הייעודי (Payload) של ה-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 נועדה להגן מפני עומסי עבודה (payloads) שחורגים מאורך תחילית 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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין ברכיב <Source> של מדיניות XMLThreatProtection מכיל מסמך XML שבו מספר מרחבי השמות בשימוש ברכיב יחיד חורג מהמספר שצוין ברכיב הצאצא <NamespaceCountPerElement> של רכיב <StructureLimits> במדיניות.

לדוגמה, אם הרכיב <NamespaceCountPerElement> מצוין כ-3 במדיניות, אבל המטען הייעודי (Payload) של הקלט מכיל רכיב עם יותר מ-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. יש לבדוק את המדיניות שנכשלה (זוהתה בשלב 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). אם מספר מרחבי השמות חורג ממספר מרחב השמות לכל רכיב, זו הסיבה לשגיאה.

    דוגמה למטען ייעודי (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>
    

    לעומס הנתונים (payload) ב-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"
        }
    }
}

סיבה

השגיאה הזו מתקבלת אם המטען הייעודי (payload) של הודעת הקלט שצוין על ידי הרכיב <Source> של מדיניות XMLProtectionPolicy הוא לא מסמך XML חוקי.

אבחון

  1. בודקים את הודעת השגיאה כדי לזהות את שם המדיניות שבה השגיאה התרחשה. בדוגמה הבאה שם המדיניות הוא XML-Threat-Protection-1.

    XMLThreatProtection stepDefinition XML-Threat-Protection-1: Execution failed.
    reason: Syntax error while parsing XML prologue
    
  2. בודקים את עומס העבודה (payload) של הקלט ובודקים אם מסמך ה-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>
    

    במטען הייעודי (payload) של XML שמוצג למעלה, שורה 9 לא סוגרת את רכיב הבסיס כמו שצריך כי / חסר. בגלל שה-XML לא בפורמט הנכון, תקבלו את השגיאה:

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

רזולוציה

מוודאים שעומס נתונים חוקי של קלט XML מועבר לכל שרת proxy של 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 ותגובות HTTP שלמות. משתני התהליך המובנים של Apigee Edge,‏ request,‏ response ו-message, הם מסוג Message. מידע נוסף על משתני הודעות זמין במאמר העזר בנושא משתנים.

אבחון

  1. מזהים את השם של המשתנה שמשויך לסוג Message בהודעת השגיאה. לדוגמה, בהודעת השגיאה הבאה, שם המשתנה הוא message.content

    Variable message.content does not resolve to a Message
    
  2. בדיקת כל כללי מדיניות XMLThreadProtection בשרת ה-proxy של ה-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 אינו מסוג 'הודעה', תקבלו את השגיאה:

    Variable message.content does not resolve to a Message
    

רזולוציה

מוודאים שהרכיב <Source> במדיניות XMLThreatProtection שנכשלה מוגדר למשתנה תהליך מסוג Message שקיים בתהליך שבו המדיניות פועלת.

כדי לתקן את המדיניות, אפשר לשנות את האלמנט <Source> כך שיציין משתנה מסוג Message. לדוגמה, ב-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>