webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Pagebuilder: Iframe component's validation is too restrictive.

Open jimjoes opened this issue 3 years ago • 1 comments

Version

5.26.0

Operating System

macos 12.2.1

Browser

Chrome 101.0.4951.64

What steps will reproduce the bug?

  1. Create an iframe on a page and start typing a url in the field. The admin app will crash when validation fails on https://w
  2. Create an iframe on a page, and try pasting the src with get parameters (e.g. google maps from this site: https://www.maps.ie/create-google-map/). The admin app will also crash. 3

What is the expected behavior?

Validation shouldn't cause the app to crash, and any url including get parameters should work.

What do you see instead?

Crashed app.

Additional information

No response

Possible solution

No response

jimjoes avatar May 19 '22 06:05 jimjoes

Yes I've just validated this, see attached screenshot.

Screen Shot 2022-05-20 at 10 44 43

We're using our validation package (validation.validateSync(data.url, "url:allowHref"); for this string, and it seems it could be a little too aggressive. It's fine for YouTube but also fails with our call booking service (https://webiny.orthisbe.com/calendar/team/t/1#/select-time)

endymion1818 avatar May 20 '22 09:05 endymion1818