Uploaded image for project: 'Lucee Development'
  1. LDEV-1167

WDDX of empty struct having "type" deserializes to empty string

    Details

    • Type: Incompatibility
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.4.23
    • Labels:
      None
    • Sprint:
      August 2017 Sprint

      Description

      The following code will produce an empty string in Lucee, but produces an empty struct in Adobe ColdFusion.

      myWDDX = '<?xml version="1.0" encoding="utf-8"?>
      <wddxPacket version="1.0">
      	<header/>
      	<data>
      		<struct type="coldfusion.server.ConfigMap"/>
      	</data>
      </wddxPacket>';
      
      cfwddx( action='wddx2cfml', input=myWDDX, output='myData');
      writeDump( myData );
      

      It doesn't seem to matter what the type is-- if it exists and has length, all empty structs are turned into empty strings. Here is the code in WDDXConverter._deserializeStruct() that is causing the bug:

      if(struct.size()==0 && type!=null && type.length()>0) {
        return "";
      }
      

      There are no comments explaining this behavior, but it doesn't seem to make any sense.

        Attachments

          Activity

            People

            • Assignee:
              21solutions Igal Sapir
              Reporter:
              bdw429s Brad Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: