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
When create an API with a malformed context eg: /testapi{version} using the publisher portal. In that case, it was deployed and published in the gateway without any error. We expecting that there should be a proper validation to check at all parameter levels while creating an API at the publisher portal and it should not save in case of an error.
Steps to Reproduce
Start the APIM server and create an API from the publisher which has the following context.
/testapi{version}
While creating the API you can see the following error trace.
INFO - API {api:TestAPI:v20} Initializing API: TestAPI:v20
Exception in thread "Thread-187" java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 10
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
at java.base/java.lang.String.substring(String.java:1874)
at org.wso2.carbon.apimgt.gateway.internal.DataHolder.addAPIMetaData_aroundBody32(DataHolder.java:138)
at org.wso2.carbon.apimgt.gateway.internal.DataHolder.addAPIMetaData(DataHolder.java:130)
at org.wso2.carbon.apimgt.gateway.internal.DataHolder.addAPIMetaData_aroundBody40(DataHolder.java:200)
at org.wso2.carbon.apimgt.gateway.internal.DataHolder.addAPIMetaData(DataHolder.java:195)
at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI_aroundBody0(InMemoryAPIDeployer.java:101)
at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI(InMemoryAPIDeployer.java:86)
at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener.lambda$0_aroundBody12(GatewayJMSMessageListener.java:170)
at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener.lambda$0(GatewayJMSMessageListener.java:147)
at java.base/java.lang.Thread.run(Thread.java:829)
However as you can see the API is deployed successfully in the gateway.
Therefore we believe that when there is a malformed context in the API, the API should not be created from the publisher portal and it should give a proper error message while creating the API.
Affected Component
APIM
Version
4.1.0
Environment Details (with versions)
No response
Relevant Log Output
INFO - API {api:TestAPI:v20} Initializing API: TestAPI:v20
Exception in thread "Thread-187" java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 10
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
at java.base/java.lang.String.substring(String.java:1874)
at org.wso2.carbon.apimgt.gateway.internal.DataHolder.addAPIMetaData_aroundBody32(DataHolder.java:138)
at org.wso2.carbon.apimgt.gateway.internal.DataHolder.addAPIMetaData(DataHolder.java:130)
at org.wso2.carbon.apimgt.gateway.internal.DataHolder.addAPIMetaData_aroundBody40(DataHolder.java:200)
at org.wso2.carbon.apimgt.gateway.internal.DataHolder.addAPIMetaData(DataHolder.java:195)
at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI_aroundBody0(InMemoryAPIDeployer.java:101)
at org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer.deployAPI(InMemoryAPIDeployer.java:86)
at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener.lambda$0_aroundBody12(GatewayJMSMessageListener.java:170)
at org.wso2.carbon.apimgt.gateway.listeners.GatewayJMSMessageListener.lambda$0(GatewayJMSMessageListener.java:147)
at java.base/java.lang.Thread.run(Thread.java:829)
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered:
Description
When create an API with a malformed context eg: /testapi{version} using the publisher portal. In that case, it was deployed and published in the gateway without any error. We expecting that there should be a proper validation to check at all parameter levels while creating an API at the publisher portal and it should not save in case of an error.
Steps to Reproduce
/testapi{version}
Therefore we believe that when there is a malformed context in the API, the API should not be created from the publisher portal and it should give a proper error message while creating the API.
Affected Component
APIM
Version
4.1.0
Environment Details (with versions)
No response
Relevant Log Output
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered: