wso2 / product-apim

Welcome to the WSO2 API Manager source code! For info on working with the WSO2 API Manager repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
846 stars 785 forks source link

API categories with special characters make Admin portal API category page keep loading #8951

Closed chathuranga95 closed 3 years ago

chathuranga95 commented 4 years ago

Description:

API categories cannot be created with special characters in the name using the Admin Portal. However, with REST API, this is possible. Creating API categories with some special character will make the Admin Portal's API categories page loading error.

Note that the same API category doesn't break Publisher functionality

Steps to reproduce:

Create an API category with following info {"name":"sp #$$%#%$","description":"testing"}

Use either admin rest api version: v0.17 or v1

Eg:

curl -X POST "https://localhost:9443/api/am/admin/v1/api-categories" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"name\": \"sp #$$%#%$\", \"description\": \"testing\"}"   -H 'authorization: Bearer <token>' -k

Go to https://localhost:9443/admin/settings/api-categories and observe the page keeps loading.

Please note that some special character containing categories, space containing categories don't make this issue occur.

Affected Product Version:

3.2.0 RC2

chanaka3d commented 4 years ago

After enabling the space character to api category name, the devportal is not able to do category search. Before allowing this from the devportal we need to fix this from the Rest API side.

dushaniw commented 3 years ago

@chamilaadhi Have we fixed this in latest master build?

kavishkafernando commented 3 years ago

Checked with @chamilaa we haven't fixed this in master.