Closed riyazathali closed 5 years ago
Looks like we can create apps with spaces in React Store but failing when doing key generation.
[2019-09-04 09:52:19,746] INFO - CarbonAuthenticationUtil 'admin@carbon.super [-1234]' logged in at [2019-09-04 09:52:19,746+0530]
[2019-09-04 09:52:19,754] ERROR - APIUtil Error occurred while creating ServiceProvider for app admin_app1 qwe_PRODUCTION
org.wso2.carbon.identity.application.common.IdentityApplicationManagementException: The Application name admin_app1 qwe_PRODUCTION is not valid! It is not adhering to the regex ^[a-zA-Z0-9._-]*$
at org.wso2.carbon.identity.application.mgt.ApplicationManagementServiceImpl.doAddApplication(ApplicationManagementServiceImpl.java:1679) ~[org.wso2.carbon.identity.application.mgt_5.14.15.jar:?]
at org.wso2.carbon.identity.application.mgt.ApplicationManagementServiceImpl.createApplicationWithTemplate(ApplicationManagementServiceImpl.java:172) ~[org.wso2.carbon.identity.application.mgt_5.14.15.jar:?]
at org.wso2.carbon.identity.application.mgt.ApplicationManagementServiceImpl.createApplication(ApplicationManagementServiceImpl.java:150) ~[org.wso2.carbon.identity.application.mgt_5.14.15.jar:?]
at org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.createOAuthApplicationByApplicationInfo_aroundBody0(APIKeyMgtSubscriberService.java:159) [org.wso2.carbon.apimgt.keymgt_6.5.74.SNAPSHOT.jar:?]
at org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.createOAuthApplicationByApplicationInfo(APIKeyMgtSubscriberService.java:107) [org.wso2.carbon.apimgt.keymgt_6.5.74.SNAPSHOT.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_211]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_211]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212) [axis2_1.6.1.wso2v37.jar:?]
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117) [axis2_1.6.1.wso2v37.jar:?]
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) [axis2_1.6.1.wso2v37.jar:?]
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110) [axis2_1.6.1.wso2v37.jar:?]
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) [axis2_1.6.1.wso2v37.jar:?]
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173) [axis2_1.6.1.wso2v37.jar:?]
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:148) [axis2_1.6.1.wso2v37.jar:?]
Description It is possible to add applications in the store with spaces in the name and there is no space validation for the application name. But, while changing the owner of an application with spaces in the name in the Admin Portal it does not allow and alerts "Name contains spaces". There is a validation to check the space in the name unnecessarily. While testing the same thing in an application without spaces in the name, it works perfectly to transfer the ownership.
Affected Product Version: APIM 2.6.0 (WUM Stamp 1566994984329)
Also the same result in the below version as well. APIM 2.5.0 (WUM Stamp 1559819540351)
Steps to reproduce: