You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Mingu Song (Jira)" <ji...@apache.org> on 2022/01/17 22:47:00 UTC

[jira] (CAMEL-17501) camel-core - FailedToCreateRouteException issue if route is very long and complex uris that cannot be sanitized

    [ https://issues.apache.org/jira/browse/CAMEL-17501 ]


    Mingu Song deleted comment on CAMEL-17501:
    ------------------------------------

was (Author: JIRAUSER283669):
Ok. thanks.

It's my fist time writing issue so I don't know detail steps.

Will I fix this code and pull request? or you? 

> camel-core - FailedToCreateRouteException issue if route is very long and complex uris that cannot be sanitized
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-17501
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17501
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.7.5
>            Reporter: Mingu Song
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 3.15.0, 3.14.1, 3.11.6
>
>         Attachments: sample_xml.txt
>
>
> In my case, the route string is a bit complex and long.
> So the sanitizeUri function was not finished and camel context was stuck.
> How about cut the route string first, then check and sanitize string.
> I think it is better way and improving performance.
> Please check this and let me change this.
> {code:java}
> protected static String getRouteMessage(String route) {
>     // ensure to sanitize uri's in the route so we do not show sensitive information such as passwords
>     route = URISupport.sanitizeUri(route);
>     // cut the route after 60 chars so it won't be too big in the message
>     // users just need to be able to identify the route so they know where to look
>     if (route.length() > 60) {
>         return route.substring(0, 60) + "...";
>     } else {
>         return route;
>     }
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)