Uploaded image for project: 'Workspaces'
  1. Workspaces
  2. WORKSPACES-1419

It is possible to change the name of a folder (in the documents section of a project) and input illegal characters

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 2.14.0
    • 2.8.0
    • Module Documents
    • None

      Bug description:
      Project folder names shouldn't contain charcaters such as "/".
      When creating a new folder, Ametys prevents the user from using such characters.
      However, Ametys doesn't prevent users from modifying existing folders and using charcaters such as "/".

      Steps to reproduce bug:
      -Create a folder in the documents section of any project
      -Modify the name of the folder so it contains illegal charcaters

      Consequence of the bug:
      It makes it impossible to access the files within the folder

          [WORKSPACES-1419] It is possible to change the name of a folder (in the documents section of a project) and input illegal characters

          James Hawken added a comment -

          It would seem the bug isn't only restricted to folder names but also file names :
          i.e : You can create a document which contains a forward slash "/" in its filename which is not allowed in Windows

          This causes the following error in OnlyOffice when trying to save the file :

          Caused by: org.ametys.plugins.repository.UnknownAmetysObjectException: There's no object at path XXXXXXXXXXXXX from path /ametys:plugins/workspaces/projects/driving-corporate-sustainability/ametys-internal:resources/documents
          at org.ametys.plugins.repository.jcr.TraversableAmetysObjectHelper#getChild:151
          at org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObjectFactory#getChild:51
          at org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject#getChild:71
          at org.ametys.plugins.explorer.resources.actions.AddOrUpdateResourceHelper#performResourceOperation:271
          at org.ametys.plugins.workspaces.documents.WorkspaceExplorerResourceDAO#addFile:1293
          at org.ametys.plugins.workspaces.documents.onlyoffice.GetOnlyOfficeResponse#processSave:277
          at org.ametys.plugins.workspaces.documents.onlyoffice.GetOnlyOfficeResponse#saveDocument:252
          at org.ametys.plugins.workspaces.documents.onlyoffice.GetOnlyOfficeResponse#callbackHandler:197
          at org.ametys.plugins.workspaces.documents.onlyoffice.GetOnlyOfficeResponse#act:120
          at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode#invoke:120
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode#invokeNodes:47
          at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode#invoke:139
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode#invokeNodes:47
          at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode#invoke:108
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode#invokeNodes:69
          at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode#invoke:143
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode#invokeNodes:69
          at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode#invoke:93
          at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor#process:236
          at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor#process:178
          at org.apache.cocoon.components.treeprocessor.TreeProcessor#process:254
          at org.apache.cocoon.components.treeprocessor.sitemap.MountNode#invoke:118
          ... 34 more 

          James Hawken added a comment - It would seem the bug isn't only restricted to folder names but also file names : i.e : You can create a document which contains a forward slash "/" in its filename which is not allowed in Windows This causes the following error in OnlyOffice when trying to save the file : Caused by: org.ametys.plugins.repository.UnknownAmetysObjectException: There's no object at path XXXXXXXXXXXXX from path /ametys:plugins/workspaces/projects/driving-corporate-sustainability/ametys-internal:resources/documents at org.ametys.plugins.repository.jcr.TraversableAmetysObjectHelper#getChild:151 at org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObjectFactory#getChild:51 at org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject#getChild:71 at org.ametys.plugins.explorer.resources.actions.AddOrUpdateResourceHelper#performResourceOperation:271 at org.ametys.plugins.workspaces.documents.WorkspaceExplorerResourceDAO#addFile:1293 at org.ametys.plugins.workspaces.documents.onlyoffice.GetOnlyOfficeResponse#processSave:277 at org.ametys.plugins.workspaces.documents.onlyoffice.GetOnlyOfficeResponse#saveDocument:252 at org.ametys.plugins.workspaces.documents.onlyoffice.GetOnlyOfficeResponse#callbackHandler:197 at org.ametys.plugins.workspaces.documents.onlyoffice.GetOnlyOfficeResponse#act:120 at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode#invoke:120 at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode#invokeNodes:47 at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode#invoke:139 at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode#invokeNodes:47 at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode#invoke:108 at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode#invokeNodes:69 at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode#invoke:143 at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode#invokeNodes:69 at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode#invoke:93 at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor#process:236 at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor#process:178 at org.apache.cocoon.components.treeprocessor.TreeProcessor#process:254 at org.apache.cocoon.components.treeprocessor.sitemap.MountNode#invoke:118 ... 34 more

            Unassigned Unassigned
            jhawken James Hawken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: