syndesisio / syndesis

This project is archived. A flexible, customizable, open source platform that provides core integration capabilities as a service.
https://syndesis.io/
Apache License 2.0
597 stars 203 forks source link

Unable to publish integration consisting of only un-sanitized characters #4906

Closed zregvart closed 2 years ago

zregvart commented 5 years ago

This is a...


[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Documentation issue or request

Description

If I try to publish an integration that has only the un-sanitized characters (e.g. I tried to publish an integration with the name "') the following error is logged on the syndesis-server console:

Exception in thread "Integration Controller" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.charAt(String.java:658)
    at io.syndesis.common.util.Names.sanitize(Names.java:76)
    at io.syndesis.server.openshift.OpenShiftServiceImpl.openshiftName(OpenShiftServiceImpl.java:492)
    at io.syndesis.server.openshift.OpenShiftServiceImpl.exists(OpenShiftServiceImpl.java:133)
    at io.syndesis.server.controller.integration.online.IntegrationController.determineState(IntegrationController.java:77)
    at io.syndesis.server.controller.integration.BaseIntegrationController.reconcileDeployment(BaseIntegrationController.java:298)
    at io.syndesis.server.controller.integration.BaseIntegrationController.checkIntegrationStatus(BaseIntegrationController.java:181)
    at io.syndesis.server.controller.integration.BaseIntegrationController.lambda$checkIntegrationStatusIfNotAlreadyInProgress$5(BaseIntegrationController.java:160)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!