Azure / Azure/LogicAppsUX

Logic Apps designer incorrectly escapes provided action input.

Open
#5,858 0 comments 0 reactions 1 assignee Claimed by @rllyy97 View on GitHub
bug
Dominant language
TypeScript
Stars
111
Forks
109
Avg merge
1d 23h
Merged PRs (30d)
20

Description

### Describe the Bug with repro steps

As per standard SWIFT message contains CRLF as new line. When customer provides SWIFT message as input to SWIFT MT decode action in designer, input is incorrectly saved and decode action fails.

But if same input is saved in code view after json escape or taken as dynamic content from previous action, decode action succeeds in runtime.

Sample input message: (Please node that each line is ended with CRLF)

{1:F01BOFAUSNYJXXX4321000123}{2:I101BANKDEFFAXXXN2020}{3:{103:CAD}{121:asf54sde-d0h6-4t26-9a4b-sdgt15rd8g6r}{434:/9zu}}{4:

:20:00040

:28D:1/1

:50F:/asdhytfgdhcedtrgyrutikngtuednfrtcs

1/sfdsfsdfsdfsd

2/sfdsfsdfsdfsd

2/sfdsfsdfsdfsd

3/US/sfsdfsdfsd

:30:020419

:21:x

:32B:USD1,

:59:/asdhytfgdhcedtrgyrutikngtuednfrtcs

1/sfdsfsdfsdfsd

2/sfdsfsdfsdfsd

2/sfdsfsdfsdfsd

3/US/sfsdfsdfsd

:71A:OUR

\-}{5:{CHK:EC8E7A48A94E}{TNG:}{PDE:}}{S:{SAC:}{COP:P}}

When provided in designer and saved, the content is saved as

\"{1:F01BOFAUSNYJXXX4321000123}{2:I101BANKDEFFAXXXN2020}{3:{103:CAD}{121:asf54sde-d0h6-4t26-9a4b-sdgt15rd8g6r}{434:/9zu}}{4:\n:20:00040\n:28D:1/1\n:50F:/asdhytfgdhcedtrgyrutikngtuednfrtcs\n1/sfdsfsdfsdfsd\n2/sfdsfsdfsdfsd\n2/sfdsfsdfsdfsd\n3/US/sfsdfsdfsd\n:30:020419\n:21:x\n:32B:USD1,\n:59:/asdhytfgdhcedtrgyrutikngtuednfrtcs\n1/sfdsfsdfsdfsd\n2/sfdsfsdfsdfsd\n2/sfdsfsdfsdfsd\n3/US/sfsdfsdfsd\n:71A:OUR\n-}{5:{CHK:EC8E7A48A94E}{TNG:}{PDE:}}{S:{SAC:}{COP:P}}\"

But content should be saved as :

{1:F01BOFAUSNYJXXX4321000123}{2:I101BANKDEFFAXXXN2020}{3:{103:CAD}{121:asf54sde-d0h6-4t26-9a4b-sdgt15rd8g6r}{434:/9zu}}{4:\r\n:20:00040\r\n:28D:1/1\r\n:50F:/asdhytfgdhcedtrgyrutikngtuednfrtcs\r\n1/sfdsfsdfsdfsd\r\n2/sfdsfsdfsdfsd\r\n2/sfdsfsdfsdfsd\r\n3/US/sfsdfsdfsd\r\n:30:020419\r\n:21:x\r\n:32B:USD1,\r\n:59:/asdhytfgdhcedtrgyrutikngtuednfrtcs\r\n1/sfdsfsdfsdfsd\r\n2/sfdsfsdfsdfsd\r\n2/sfdsfsdfsdfsd\r\n3/US/sfsdfsdfsd\r\n:71A:OUR\r\n-}{5:{CHK:EC8E7A48A94E}{TNG:}{PDE:}}{S:{SAC:}{COP:P}}

Please node how designer adds \n instead of \r\n as new line. Also extra \" added at beginning and end of the input.

This can be easily reproduced with any logic app action.

### What type of Logic App Is this happening in?

Standard (Portal)

### Which operating system are you using?

Windows

### Are you using new designer or old designer

New Designer

### Did you refer to the TSG before filing this issue? [https://aka.ms/lauxtsg]()

Yes

### Workflow JSON

*No response*

### Screenshots or Videos

*No response*

### Browser

\-Edge

### Additional context

*No response*

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.