IBM Support

IT28401: DATAPOWER INCORRECTLY ESCAPES SEQUENCE OF 2 REVERSE SOLIDUS CHARACTERS USING DP:ENCODE(_, JSON-ESCAPE )

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR status

  • Closed as program error.

Error description

  • DataPower incorrectly escapes sequence of 2 reverse solidus
    characters using dp:encode(_, "json-escape"). Consequently
    store:///jsonx2json.xsl does the same incorrect escaping.
    

Local fix

Problem summary

  • DataPower incorrectly escapes sequence of 2 reverse solidus
    characters using dp:encode(_, "json-escape").
    
    The correct way to deal with reverse solidus in JSONX is to
    interpret it as the reverse solidus character. That would need
    to be escaped as "\\" in output of dp:encode(_, "json-escape").
    Especially if a backend system returns "\\\\" as part of a JSON
    string to DataPower, it will become "\\" in JSONX by JSON
    response type, and would need to be escaped by dp:encode(_,
    "json-escape") as "\\\\" in JSON again.
    

Problem conclusion

  • Fix is available in 7.6.0.16
    
    Back in 2015 that (correct) behavior was changed by APAR
    IT07570. Since then "\" was not just the reverse solidus
    character when appearing in JSONX, it had the same escaping
    functionality that it has in JSON, but in JSONX. So "\\" was
    interpreted as single reverse solidus character in JSONX, and
    dp:encode(_, "json-escape") keeps it as "\\" in JSON.
    
    Too many customer configurations as well as APIC depend on the
    behavior since 2015.
    New dp:encode(_, 'json-escape-reverse-solidus') provides the
    correct behavior.
    
    Please use either store:///jsonx2json.xsl or
    store:///jsonx2json-reverse-solidus.xsl, depending on which
    method of dealing with reverse solidus character in JSONX you
    want.
    
    
    For a list of the latest fix packs available, please see:
    http://www-01.ibm.com/support/docview.wss?uid=swg21237631
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT28401

  • Reported component name

    DATAPOWER

  • Reported component ID

    DP1234567

  • Reported release

    760

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-03-11

  • Closed date

    2019-07-23

  • Last modified date

    2019-07-24

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DATAPOWER

  • Fixed component ID

    DP1234567

Applicable component levels



Document information

More support for: IBM DataPower Gateways
General

Software version: 760

Reference #: IT28401

Modified date: 24 July 2019