Allow Ports in Git Provider Endpoint for Dashboard - Personal Access Tokens #23013
Labels
area/dashboard
good first issue
Community, this issue looks easy to start with for a new contributor. Just take it. We'll help you!
kind/enhancement
A feature request - must adhere to the feature request template.
severity/P2
Has a minor but important impact to the usage or development of the system.
Is your enhancement related to a problem? Please describe
Currently adding a personal access token in the dashboard user preferences section does not allow adding a port number to the URL. Our enterprise currently has bitbucket installed and bound to a port other than 443. I believe this is due to sanitation here
https://github.com/eclipse-che/che-dashboard/blob/28abf62c50c55e0bebc48ca98be9e5b70921548b/packages/dashboard-frontend/src/pages/UserPreferences/PersonalAccessTokens/AddEditModal/Form/GitProviderEndpoint/index.tsx#L102
Describe the solution you'd like
Expanding the regex to allow ports in the Git Provider Endpoint field.
Maybe this regex will work:
/^https?:\/\/(?:(?:[a-z\d]+(?:-[a-z\d]+)*)\.)+[a-z]{2,}(?::\d+)?(?:\/[^\s]*)?$/i
Describe alternatives you've considered
I was able to create the necessary token through oc commands in our openshift environment following the instructions here but editing/adding in the dashboard ui does not allow submitting of the form when a port is in the url.
Additional context
No response
The text was updated successfully, but these errors were encountered: