Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: cannot set string that contains dot through the URL #30140

Open
vtaits opened this issue Dec 25, 2024 · 0 comments
Open

[Bug]: cannot set string that contains dot through the URL #30140

vtaits opened this issue Dec 25, 2024 · 0 comments

Comments

@vtaits
Copy link

vtaits commented Dec 25, 2024

Describe the bug

Hello. I'm writing playwright tests according to this guide

https://storybook.js.org/docs/writing-tests/import-stories-in-tests/stories-in-end-to-end-tests#with-playwright

And my story args should be like this &args=client_date_format%3Add.MM.yyyy

But I get the message Omitted potentially unsafe URL args.

Could you please allow dots in string arguments or add an option to disable this validation, because an XSS attack on the static server without a backend can't do something harmful, but the lack of tests can.

Reproduction link

https://5f27fec87f827f00226fd51a-mkzlawwyms.chromatic.com/?path=/story/components-badge--base&args=children:Test.Test&globals=colorScheme:dark

Reproduction steps

Expected behavior:

  1. Text in the badge is Test.Test
  2. Value of the children control is Test.Test

Actual behavior:

  1. Text is default (Badge)
  2. Value is default (Badge)
  3. Warning in console
Omitted potentially unsafe URL args.
More info: https://storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url

System

Storybook Environment Info:

  System:
    OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.18.0 - /usr/local/bin/node
    Yarn: 4.5.3 - /usr/local/bin/yarn <----- active
    npm: 10.8.2 - /usr/local/bin/npm

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant