[MGNLDAM-597] AbstractPropertyValueSearchDamMigrationTask does not escape paths when building the query Created: 30/Jun/15 Updated: 10/Aug/15 Resolved: 30/Jul/15 |
|
| Status: | Closed |
| Project: | Magnolia DAM Module |
| Component/s: | None |
| Affects Version/s: | 2.0.9 |
| Fix Version/s: | 2.0.11, 2.1.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Rico Jansen | Assignee: | Christoph Meier |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | dam, migration, support | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.75d | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Centos, Postgresql, Magnolia 5.3.9 |
||
| Issue Links: |
|
||||
| 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
|
||||
| Date of First Response: | |||||
| Sprint: | Sprint 3 (Vietnam), Sprint 4 (Basel) | ||||
| Story Points: | 5 | ||||
| Description |
|
The createQuery function on AbstractPropertyValueSearchDamMigrationTask does not escape the path provided. This means that paths starting with a number (in our case 3voor12) can not be migrated. |
| Comments |
| Comment by Rico Jansen [ 30/Jun/15 ] |
|
To fix this: use the ISO9075 encode function of jackrabbit.
protected String createQuery(String path) {
String query = "";
query = "/jcr:root" + ISO9075.encode(path) + "//element(*,nt:base)[jcr:contains(., '" + getPropertyValue() + "')] ";
return query;
}
|
| Comment by Christoph Meier [ 30/Jul/15 ] |
|
Fixed according to the reported issue. |
| Comment by Christoph Meier [ 30/Jul/15 ] |
|
Checking tests again. |