valtech / aem-easy-content-upgrade

AEM Easy Content Upgrade simplifies content migrations in AEM projects
Other
61 stars 25 forks source link

Scripts outside the predetermined paths might be executed #194

Closed santiagozky closed 1 year ago

santiagozky commented 1 year ago

The documentation says

All migration scripts need to be located in:

/apps/aecu-scripts (AEM Cloud automatic execution with startup hook, since 6.0.0) /conf/groovyconsole/scripts/aecu (AEM onprem manual and install hook execution, AEM Cloud manual execution) /var/groovyconsole/scripts/aecu (deprecated)

but the code uses String.starthWith(String) to evaluate the paths of the scripts to be executed. This means that it also execute scripts in sibling paths as long as they start with aecu. e.g. /conf/groovyconsole/scripts/aecu-XXX.

Since this discrepancy seems to have existed for a very long time (version 1.x already had it). I suggest to update the documentation to better explain the behaviour.

gruberrolandvaltech commented 1 year ago

Thanks, code was update to enforce folders: https://github.com/valtech/aem-easy-content-upgrade/commit/a789d83021ec2b926e7c7e10257a418a38b20464