LedFx icon indicating copy to clipboard operation
LedFx copied to clipboard

Using special characters in the name of a scene causes errors

Open 4ndy8 opened this issue 2 years ago • 16 comments

Describe the bug Using a hyphen in the name of a scene causes error message "scene xxxx does not exist" when loading it and other errors, like device not listed that the scene operates on in the edit page.

To Reproduce Steps to reproduce the behavior: Create a scene with a hyphen in it. Then try to edit the scene and see error message shown.

Expected behavior Either prevent user entering the hyphen, or cope with it in name.

Traceback If applicable, add the traceback log that LedFx outputs when it encounters an error. Usually starts with "Traceback (most recent call last):"

LedFx Host Information (please complete the following information): LEDfx 2.0.92 on windows 10 64bit

4ndy8 avatar Feb 10 '24 21:02 4ndy8

Thanks for the bug report - this is actually a much bigger issue and something that has always existed, we've just never noticed it before!

This is going to take us a bit of time to think about and unpick, since the underlying issue is related to a very old, deep part of LedFx that to be honest, I'm a bit fuzzy on 🤣

There's a few ways for us to tackle it:

  • Reject special characters at the frontend
  • Use name as the scene id
  • Integrate special characters as part of scene id

Each of them have their own positives/negatives that we're gonna need to explore and think about.

From my perspective, rejecting at the frontend is not a good option since it leaves no protection for others using the API.

In the meantime, please don't use any special characters anywhere.

shauneccles avatar Feb 10 '24 23:02 shauneccles

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 17 '24 16:03 stale[bot]