You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EnsureServiceUser config format should strip leading/trailing whitespace for array elements in aces property, for better diff visibility in config files.
#1552
Closed
3 tasks done
adamcin opened this issue
Nov 9, 2018
· 2 comments
AEM Version, including Service Packs, Cumulative Fix Packs, etc: any
ACS AEM Commons Version: <=3.19
Reproducible on Latest? yes
Expected Behavior
Given an EnsureServiceUser sling:OsgiConfig file with multiple values for aces separated by newlines, the whitespace surrounding each element should not be treated as part of the first key or the last value:
Given the above file, the current behavior results in an EnsureAuthorizableException thrown because the whitespace before the "type" key is retained, and therefore fails to match the PROP_TYPE constant in the comparison logic.
thrownewEnsureAuthorizableException("Ensure Service User requires valid type. [ " + type + " ] type is invalid");
The inconvenient workaround is to eliminate the white space altogether, which forces code reviewers to scroll to the right a ways in order to spot any changes in a pull request.
Steps to Reproduce
Create a new sling:OsgiConfig node at /apps/system/config/com.adobe.acs.commons.users.impl.EnsureServiceUser-acme-workflow-service.xml with the above content, and capture the log output during config installation.
The text was updated successfully, but these errors were encountered:
Required Information
Expected Behavior
Given an EnsureServiceUser sling:OsgiConfig file with multiple values for aces separated by newlines, the whitespace surrounding each element should not be treated as part of the first key or the last value:
Actual Behavior
Given the above file, the current behavior results in an EnsureAuthorizableException thrown because the whitespace before the "type" key is retained, and therefore fails to match the
PROP_TYPE
constant in the comparison logic.The bug manifests here:
acs-aem-commons/bundle/src/main/java/com/adobe/acs/commons/users/impl/Ace.java
Line 91 in d8201d0
The symptomatic exception is thrown here:
acs-aem-commons/bundle/src/main/java/com/adobe/acs/commons/users/impl/Ace.java
Line 118 in d8201d0
The inconvenient workaround is to eliminate the white space altogether, which forces code reviewers to scroll to the right a ways in order to spot any changes in a pull request.
Steps to Reproduce
Create a new sling:OsgiConfig node at
/apps/system/config/com.adobe.acs.commons.users.impl.EnsureServiceUser-acme-workflow-service.xml
with the above content, and capture the log output during config installation.The text was updated successfully, but these errors were encountered: