Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
Master
Description
Steps to reproduce
- Add a user with apostrophe in its email address via curl as following, replace the value accordingly, the email address is user%[email protected]
curl -X POST -u "[email protected]:test" -d "companyId=20098" -d "autoPassword=false" -d "password1=initPassword" -d "password2=initPassword" -d "autoScreenName=false" -d "screenName=usersn1" -d "emailAddress=user%[email protected]" -d "facebookId=0" -d "openId=" -d "locale=" -d "firstName=userfn1" -d "middleName=" -d "lastName=userln1" -d "prefixId=0" -d "suffixId=0" -d "male=true" -d "birthdayMonth=4" -d "birthdayDay=31" -d "birthdayYear=1986" -d "jobTitle=" -d "groupIds=" -d "organizationIds=" -d "roleIds=" -d "userGroupIds=" -d "sendEmail=true" -d "serviceContext={\"addGroupPermissions\" : true, \"addGuestPermissions\": true}" http://localhost:8080/api/jsonws/user/add-user
- Assert the user data returns
- Double check in the Users and Organizations > User list
- Assert the user is added
- Assert the new added user's email address displays as user'[email protected]
- Try to get the user by email address via curl
curl -X GET -u "[email protected]:test" http://localhost:8080/api/jsonws/user/get-user-by-email-address/company-id/20098/email-address/user%[email protected]
- Assert no user data returns
Actual Result
No user returns after invoking.
Expect Result
The proper user data should returns since the user was added in portal successfully.
[exec] BUILD FAILED: No results for path: $['userId'] [exec] /opt/dev/projects/github/liferay-portal/portal-web/test/functional/com/liferay/portalweb/macros/json/user/JSONUserAPI.macro[_getUserIdByEmailAddress]:235 [exec] /opt/dev/projects/github/liferay-portal/portal-web/test/functional/com/liferay/portalweb/macros/json/user/JSONUserSetter.macro[setUserId]:94 [exec] /opt/dev/projects/github/liferay-portal/portal-web/test/functional/com/liferay/portalweb/macros/json/user/JSONUser.macro[setFirstPassword]:251 [exec] /opt/dev/projects/github/liferay-portal/portal-web/test/functional/com/liferay/portalweb/tests/coreinfrastructure/administration/users/cpusersandorganizations/UsersAdmin.testcase[AddUserEmailAddressApostrophe]:150 [exec] [exec] [exec] com.liferay.poshi.runner.PoshiRunner > test[LocalFile.UsersAdmin#AddUserEmailAddressApostrophe] STANDARD_ERROR [exec] java.lang.Exception: No results for path: $['userId'] [exec] at com.liferay.poshi.core.util.ExternalMethod.execute(ExternalMethod.java:46) [exec] at com.liferay.poshi.core.util.ExternalMethod.execute(ExternalMethod.java:91)
Attachments
Issue Links
- causes
-
LPS-159047 compileTestJava error in JSONWebServiceServletTest.java
-
- Closed
-
- is caused by
-
LPS-151342 Move JSONWebServiceServlet and its jsps to portal-remote-json-web-service-web
-
- Closed
-