Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-6279

URI encoded special characters cause some troubles at email transport

    Details

    • User impact:
      Medium
    • Configuration:
      Hide

      <pop3:inbound-endpoint name="myPOP" address="pop3://bob:foo%2Bfoo@host" />
      <pop3:inbound-endpoint name="myPOP" address="pop3://bob:%25foo@host" />
      <pop3:inbound-endpoint name="myPOP" address="pop3://bob:foo%23%5Bbar@host" />
      <pop3:inbound-endpoint user="bob" password="%25foo" host="host" />

      Show
      <pop3:inbound-endpoint name="myPOP" address="pop3://bob:foo%2Bfoo@host" /> <pop3:inbound-endpoint name="myPOP" address="pop3://bob:%25foo@host" /> <pop3:inbound-endpoint name="myPOP" address="pop3://bob:foo%23%5Bbar@host" /> <pop3:inbound-endpoint user="bob" password="%25foo" host="host" />
    • Log Output:
      Hide

      ********************************************************************************
      Message : Failed to start inbound endpoint "myPOP"
      Type : org.mule.api.lifecycle.LifecycleException
      Code : MULE_ERROR-70312
      JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html
      ********************************************************************************
      Exception stack is:
      1. URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "fo" (java.lang.IllegalArgumentException)
        java.net.URLDecoder:-1 (null)
      2. Failed to start inbound endpoint "myPOP" (org.mule.api.lifecycle.LifecycleException)
        org.mule.endpoint.DefaultInboundEndpoint:118 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html)
      ********************************************************************************
      Root Exception stack trace:
      java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "fo"
      at java.net.URLDecoder.decode(Unknown Source)
      at org.mule.transport.email.AbstractMailConnector.urlFromEndpoint(AbstractMailConnector.java:122)
      at org.mule.transport.email.AbstractMailConnector.newSession(AbstractMailConnector.java:185)
      at org.mule.transport.email.AbstractMailConnector.getSessionDetails(AbstractMailConnector.java:94)
      at org.mule.transport.email.RetrieveMessageReceiver.doConnect(RetrieveMessageReceiver.java:79)
      at org.mule.transport.AbstractTransportMessageHandler.connect(AbstractTransportMessageHandler.java:218)
      at org.mule.transport.AbstractConnector.registerListener(AbstractConnector.java:1248)
      at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:104)
      <snip>


      ********************************************************************************
      Message : The endpoint "pop3://bob:foo#[bar@pop:110" is malformed and cannot be parsed. If this is the name of a global endpoint, check the name is correct, that the endpoint exists, and that you are using the correct configuration (eg the "ref" attribute). Note that names on inbound and outbound endpoints cannot be used to send or receive messages; use a named global endpoint instead.. Only Outbound endpoints can be dynamic
      Type : org.mule.api.endpoint.MalformedEndpointException
      Code : MULE_ERROR-64051
      JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/endpoint/MalformedEndpointException.html
      ********************************************************************************
      Exception stack is:
      1. The endpoint "pop3://bob:foo#[bar@pop:110" is malformed and cannot be parsed. If this is the name of a global endpoint, check the name is correct, that the endpoint exists, and that you are using the correct configuration (eg the "ref" attribute). Note that names on inbound and outbound endpoints cannot be used to send or receive messages; use a named global endpoint instead.. Only Outbound endpoints can be dynamic (org.mule.api.endpoint.MalformedEndpointException)
        org.mule.endpoint.AbstractEndpointBuilder:183 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/endpoint/MalformedEndpointException.html)
      ********************************************************************************
      Root Exception stack trace:
      org.mule.api.endpoint.MalformedEndpointException: The endpoint "pop3://bob:foo#[bar@pop:110" is malformed and cannot be parsed. If this is the name of a global endpoint, check the name is correct, that the endpoint exists, and that you are using the correct configuration (eg the "ref" attribute). Note that names on inbound and outbound endpoints cannot be used to send or receive messages; use a named global endpoint instead.. Only Outbound endpoints can be dynamic
      at org.mule.endpoint.AbstractEndpointBuilder.doBuildInboundEndpoint(AbstractEndpointBuilder.java:183)
      at org.mule.endpoint.AbstractEndpointBuilder.buildInboundEndpoint(AbstractEndpointBuilder.java:117)
      at org.mule.endpoint.DefaultEndpointFactory.getInboundEndpoint(DefaultEndpointFactory.java:83)
      <snip>
      Show
      ******************************************************************************** Message : Failed to start inbound endpoint "myPOP" Type : org.mule.api.lifecycle.LifecycleException Code : MULE_ERROR-70312 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html ******************************************************************************** Exception stack is: 1. URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "fo" (java.lang.IllegalArgumentException)   java.net.URLDecoder:-1 (null) 2. Failed to start inbound endpoint "myPOP" (org.mule.api.lifecycle.LifecycleException)   org.mule.endpoint.DefaultInboundEndpoint:118 ( http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/LifecycleException.html ) ******************************************************************************** Root Exception stack trace: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "fo" at java.net.URLDecoder.decode(Unknown Source) at org.mule.transport.email.AbstractMailConnector.urlFromEndpoint(AbstractMailConnector.java:122) at org.mule.transport.email.AbstractMailConnector.newSession(AbstractMailConnector.java:185) at org.mule.transport.email.AbstractMailConnector.getSessionDetails(AbstractMailConnector.java:94) at org.mule.transport.email.RetrieveMessageReceiver.doConnect(RetrieveMessageReceiver.java:79) at org.mule.transport.AbstractTransportMessageHandler.connect(AbstractTransportMessageHandler.java:218) at org.mule.transport.AbstractConnector.registerListener(AbstractConnector.java:1248) at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:104) <snip> ******************************************************************************** Message : The endpoint " pop3://bob:foo# [ bar@pop :110" is malformed and cannot be parsed. If this is the name of a global endpoint, check the name is correct, that the endpoint exists, and that you are using the correct configuration (eg the "ref" attribute). Note that names on inbound and outbound endpoints cannot be used to send or receive messages; use a named global endpoint instead.. Only Outbound endpoints can be dynamic Type : org.mule.api.endpoint.MalformedEndpointException Code : MULE_ERROR-64051 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/endpoint/MalformedEndpointException.html ******************************************************************************** Exception stack is: 1. The endpoint " pop3://bob:foo# [ bar@pop :110" is malformed and cannot be parsed. If this is the name of a global endpoint, check the name is correct, that the endpoint exists, and that you are using the correct configuration (eg the "ref" attribute). Note that names on inbound and outbound endpoints cannot be used to send or receive messages; use a named global endpoint instead.. Only Outbound endpoints can be dynamic (org.mule.api.endpoint.MalformedEndpointException)   org.mule.endpoint.AbstractEndpointBuilder:183 ( http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/endpoint/MalformedEndpointException.html ) ******************************************************************************** Root Exception stack trace: org.mule.api.endpoint.MalformedEndpointException: The endpoint " pop3://bob:foo# [ bar@pop :110" is malformed and cannot be parsed. If this is the name of a global endpoint, check the name is correct, that the endpoint exists, and that you are using the correct configuration (eg the "ref" attribute). Note that names on inbound and outbound endpoints cannot be used to send or receive messages; use a named global endpoint instead.. Only Outbound endpoints can be dynamic at org.mule.endpoint.AbstractEndpointBuilder.doBuildInboundEndpoint(AbstractEndpointBuilder.java:183) at org.mule.endpoint.AbstractEndpointBuilder.buildInboundEndpoint(AbstractEndpointBuilder.java:117) at org.mule.endpoint.DefaultEndpointFactory.getInboundEndpoint(DefaultEndpointFactory.java:83) <snip>
    • Migration Impact:
      See MULE-8927
    • Similar Issues:

      Description

      Some encoded special characters('+', '%', '#[' are misunderstood during building email endpoint.

      On email transport, it pass the user and password strings from EndpointURL to javax.net.URLName after decode twice.
      On endpoint builder, it use the strings after URL decode for checking the expression syntax.

        Attachments

          Activity

            People

            • Assignee:
              rodrigo.merino Rodrigo Merino
              Reporter:
              nony_83 Noriko Toyota
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                16/May/16