DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to allow / handle URL that contains '&' symbol

    Posted Mon April 20, 2020 07:07 AM
    We are unable to see the URL in the probe since the URI contains '&' symbol. Got to know that Datapower doesn't allow '&' symbol. Can some please let me know How to allow / handle URL that contains '&' symbol so that I can been read by Datapower and seen in probe (inbound URL) and service variable (var/service/routing/uri) .

    Example : https://abc.com /v1/change_notification?reference=12bc34&validationToken=12345.
    When I see probe &validationToken=12345 part is missing in inbound URL and nothing is seen in
    service variable (var/service/routing/uri) .

    For other symbols like " ?, #‌, ..  "  I see there's direct option in FSH to allow / not allow then but that's not the case with '&' .


    ------------------------------
    Nikhil Bachu
    ------------------------------


  • 2.  RE: How to allow / handle URL that contains '&' symbol

    Posted Mon April 20, 2020 08:38 AM

    Hi,
    Probe works fine for me, I have a loopback XML firewall with convert-http action.
    Here you can see that curl request outputs what it should:

    $ curl "http://dp3-l3.boeblingen.de.ibm.com:2070?reference=12bc34&validationToken=12345"; echo
    <?xml version="1.0" encoding="UTF-8"?>
    <request><url>/?reference=12bc34&amp;validationToken=12345</url><base-url>/</base-url><args src="url"><arg name="reference">12bc34</arg><arg name="validationToken">12345</arg></args></request>
    $

    This is Probe URL-in variable with the ampersand:



    Please create a support ticket with service export and instruction on how to trigger the issue you have.


    ------------------------------
    Hermann Stamm-Wilbrandt
    Compiler Level 3 support & Fixpack team lead
    IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
    ------------------------------



  • 3.  RE: How to allow / handle URL that contains '&' symbol

    Posted Tue April 21, 2020 01:53 AM
    To my surprise I see issue is only happening when I use CURL request for testing. I'm using the below curl command :

    curl -k -d @JsonSample.json http://10.38.203.1:4843/v1/change_notification?reference=abcd&ValidationToken=1234

    When I use sendtest message utility on probe datapower I see there's no issue at all I'm able to see what I'm passing.

    ------------------------------
    Nikhil Bachu
    ------------------------------



  • 4.  RE: How to allow / handle URL that contains '&' symbol

    Posted Tue April 21, 2020 05:03 AM
    Are you sure that your shell isn't reading the ampersand as a shell command?
    Try to escape the URL or put it into double quotes.

    ------------------------------
    Hermanni Pernaa
    ------------------------------



  • 5.  RE: How to allow / handle URL that contains '&' symbol

    Posted Tue April 21, 2020 09:04 AM
    What Hermanni wrote is exactly what happened to me, and I added double quotes around the URL for that reason in my previous posting.

    ------------------------------
    Hermann Stamm-Wilbrandt
    Compiler Level 3 support & Fixpack team lead
    IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
    ------------------------------



  • 6.  RE: How to allow / handle URL that contains '&' symbol

    Posted Wed April 22, 2020 07:13 AM
    Yes, That's was the issue. Just placing the URL in double quotes has fixed the issue.

    curl -k  "http://10.38.203.1:4843/v1/change_notification?reference=abcd&ValidationToken=1234".

    ------------------------------
    Nikhil Bachu
    ------------------------------