[MGNLUI-2484] MoveAclPermissionsBetweenWorkspaces should handle in a better way 4.5 path definition Created: 04/Dec/13  Updated: 16/Dec/13  Resolved: 06/Dec/13

Status: Closed
Project: Magnolia UI
Component/s: security app
Affects Version/s: 5.2
Fix Version/s: 5.2.1

Type: Bug Priority: Major
Reporter: Eric Hechinger Assignee: Eric Hechinger
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Handling incoming path of this kind

<sv:property sv:name="path" sv:type="String">
  <sv:value>/*/*</sv:value>
</sv:property>

or

<sv:property sv:name="path" sv:type="String">
 <sv:value>/openwfe/*/*</sv:value>
</sv:property>

generates the following exceptions.

This definition was supported in 4.5 and correspond to the following security entry:

  • Read Only | Sub Nodes | /*
    4.5 stored (Sub Nodes | /) as : //*
2013-12-04 11:23:50,230 ERROR info.magnolia.module.InstallContextImpl : > Could not install or update corporate-website-configuration module. Task 'Move ACL define for the DMS workspace to the DAM workspace' failed. (MalformedPathException: '/*' is not a valid path. '*' not a valid name character.)
info.magnolia.module.delta.TaskExecutionException: Could not execute task: Repository: Invalid path:/*
at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:62)
at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:512)
at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:494)
at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:277)
at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:415)
at info.magnolia.context.MgnlContext$VoidOp.exec(MgnlContext.java:412)
at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:386)
at info.magnolia.module.ModuleManagerImpl.performInstallOrUpdate(ModuleManagerImpl.java:271)
at info.magnolia.module.ui.ModuleManagerWebUI$2.run(ModuleManagerWebUI.java:127)
at java.lang.Thread.run(Thread.java:695)
Caused by: javax.jcr.RepositoryException: Invalid path:/*
at org.apache.jackrabbit.core.session.SessionItemOperation.perform(SessionItemOperation.java:194)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:361)
at org.apache.jackrabbit.core.SessionImpl.itemExists(SessionImpl.java:803)
at info.magnolia.jcr.wrapper.DelegateSessionWrapper.itemExists(DelegateSessionWrapper.java:259)
at info.magnolia.jcr.wrapper.DelegateSessionWrapper.itemExists(DelegateSessionWrapper.java:259)
at info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper.itemExists(ContentDecoratorSessionWrapper.java:72)
at info.magnolia.jcr.wrapper.DelegateSessionWrapper.itemExists(DelegateSessionWrapper.java:259)
at info.magnolia.jcr.wrapper.DelegateSessionWrapper.itemExists(DelegateSessionWrapper.java:259)
at info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper.itemExists(ContentDecoratorSessionWrapper.java:72)
at info.magnolia.security.setup.migration.MoveAclPermissionsBetweenWorkspaces.handleAclNode(MoveAclPermissionsBetweenWorkspaces.java:132)
at info.magnolia.security.setup.migration.MoveAclPermissionsBetweenWorkspaces.doExecute(MoveAclPermissionsBetweenWorkspaces.java:111)
at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:60)
... 9 more
Caused by: org.apache.jackrabbit.spi.commons.conversion.MalformedPathException: '/*' is not a valid path. '*' not a valid name character.
at org.apache.jackrabbit.spi.commons.conversion.PathParser.parse(PathParser.java:405)
at org.apache.jackrabbit.spi.commons.conversion.PathParser.parse(PathParser.java:122)
at org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver.getQPath(ParsingPathResolver.java:90)
at org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver.getQPath(CachingPathResolver.java:98)
at org.apache.jackrabbit.spi.commons.conversion.CachingPathResolver.getQPath(CachingPathResolver.java:77)
at org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQPath(DefaultNamePathResolver.java:82)
at org.apache.jackrabbit.core.SessionImpl.getQPath(SessionImpl.java:648)
at org.apache.jackrabbit.core.session.SessionContext.getQPath(SessionContext.java:338)
at org.apache.jackrabbit.core.session.SessionItemOperation.perform(SessionItemOperation.java:184)
... 21 more


 Comments   
Comment by Eric Hechinger [ 05/Dec/13 ]

An Additional step is added to the migration task.

  • Check first if the link is well-formed
    • If not, log and handle the next one
    • If yes, perform the same logic a previously.
Generated at Mon Feb 12 08:57:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.