ICEfaces
  1. ICEfaces
  2. ICE-11494

ice:outputResource fails when resource name contains illegal URL characters

    Details

      Description

      A syntax error is produced when a resource served by these components contains illegal URL characters. All illegal URL characters should be encoded.

        Activity

        Arturo Zambrano created issue -
        Arturo Zambrano made changes -
        Field Original Value New Value
        Assignee Arturo Zambrano [ artzambrano ]
        Arturo Zambrano made changes -
        Summary ice:outputResource, ace:dynamicResource fail when resource name contain illegal URL characters ice:outputResource, ace:dynamicResource fail when resource name contains illegal URL characters
        Arturo Zambrano made changes -
        Fix Version/s EE-3.3.0.GA_P08 [ 13293 ]
        Fix Version/s EE-4.3.0.GA_P02 [ 13292 ]
        Hide
        Arturo Zambrano added a comment - - edited

        r53224: ICE-11494 added functions to efficiently encode special characters in the file name portion of the resource path, so that resources that contain special characters can be downloaded (to the EE 3.3 maintenance branch)

        Because of the reasons described in ICE-11484, it wasn't possible to apply the encoding only to the file name, before it was registered. Trying to do this from the component class resulted in including the % encoding characters in the downloaded filename, because that's how the resource was registered on the framework. So, this solution takes the resource path and extracts the filename portion and escapes all special characters, and inserts it back in the resource path, replacing the old file name, in order to form a valid URL.

        Note that while all special characters are correctly escaped now, some special characters may be illegal in some operating systems, which results in the OS replacing those special characters for a safe characters. For example, on Windows, all these characters / \ " * : < > ? | ~ are replaced by underscores when saved to the file system.

        Show
        Arturo Zambrano added a comment - - edited r53224: ICE-11494 added functions to efficiently encode special characters in the file name portion of the resource path, so that resources that contain special characters can be downloaded (to the EE 3.3 maintenance branch) Because of the reasons described in ICE-11484 , it wasn't possible to apply the encoding only to the file name, before it was registered. Trying to do this from the component class resulted in including the % encoding characters in the downloaded filename, because that's how the resource was registered on the framework. So, this solution takes the resource path and extracts the filename portion and escapes all special characters, and inserts it back in the resource path, replacing the old file name, in order to form a valid URL. Note that while all special characters are correctly escaped now, some special characters may be illegal in some operating systems, which results in the OS replacing those special characters for a safe characters. For example, on Windows, all these characters / \ " * : < > ? | ~ are replaced by underscores when saved to the file system.
        Arturo Zambrano made changes -
        Summary ice:outputResource, ace:dynamicResource fail when resource name contains illegal URL characters ice:outputResource fails when resource name contains illegal URL characters
        Arturo Zambrano made changes -
        Fix Version/s EE-4.3.0.GA_P02 [ 13292 ]
        Hide
        Arturo Zambrano added a comment -

        This issue is actually not present in ace:dynamicResource, because it uses a different mechanism to serve resources.

        Show
        Arturo Zambrano added a comment - This issue is actually not present in ace:dynamicResource, because it uses a different mechanism to serve resources.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Arturo Zambrano added a comment -

        r53237: added code to avoid NPE's when the resource has no filename specified

        Show
        Arturo Zambrano added a comment - r53237: added code to avoid NPE's when the resource has no filename specified
        Hide
        Arturo Zambrano added a comment - - edited

        r53334, r53335: A reworked fix to support escaping of spaces, special characters, and foreign/UTF-8 characters in ice:outputResource and ace:dynamicResource (EE 3.3 maintenance branch and P08 tag)

        Show
        Arturo Zambrano added a comment - - edited r53334, r53335: A reworked fix to support escaping of spaces, special characters, and foreign/UTF-8 characters in ice:outputResource and ace:dynamicResource (EE 3.3 maintenance branch and P08 tag)
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: