ramp4-pcar4 / storylines-editor

An editor for RAMP Storylines
5 stars 13 forks source link

Trailing spaces are accepted in RESPECT IDs #329

Closed dan-bowerman closed 1 month ago

dan-bowerman commented 2 months ago

Found by Matt in 2024-06-18 Testing Party

Description

UUIDs that are identical to one another but have a space at the end can be saved in the express server. I created a storyline called "Matt - Testing Party " (with a space at the end), and was then able to create "Matt - Testing Party" successfully. We should be trimming UUIDs before they're saved.

Steps to reproduce

  1. Create a new storyline with a similar format to "Matt - Testing Party "
  2. Save it
  3. Create another storyline with a similar format to "Matt - Testing Party" (no space at the end)
  4. Both will be saved to the server (via express), .NET api will grouse about there being two storylines with the same UUID and won't save it to the DB.

Expected behavior

Shouldn't be able to create a UUID with a space at the end

Actual behavior

This also effects the duplicate UUID check

Additional information

DanB: In my case ("DanB2 - Testing Party " vs. "DanB2 - Testing Party", the Saving spinner just perpetually spins, no save action occurs.

szczz commented 2 months ago

In my case ("DanB2 - Testing Party " vs. "DanB2 - Testing Party", the Saving spinner just perpetually spins, no save action occurs.

If you look in the console you'll see the .NET API grouse back about the duplicate UUID. The spinner is awaiting a success response. Frontend code should be updated to stop the spinner and show an error message if the .NET API returns an error as well.