View Issue Details

IDProjectCategoryView StatusLast Update
00298092.x IDE BugsVariables WindowPublic2018-10-31 10:24
ReporterYellowAfterlifeAssigned ToSteven Campbell 
PriorityHighSeverityB - MajorReproducibility100%
Status ClosedResolutionFixed 
PlatformOSWindows 10 ProOS Version>=1703
Product Version2.1.4 
Target Version2.2.1Fixed in Version2.2.1 
Summary0029809: Variables WIndow: String-type instance variable values aren't validated for all escape sequences and thus can break room JSON
DescriptionTurns out that String-type variable values aren't validated before putting them as-is into JSON, which has it that if you input an invalid escape sequence, your room will become invalid JSON.
Steps To Reproduce1 Open the project
2 Open the room
3 Open that single instance's Variables UI
4 Change `put it here -> ` to `put it here -> \`
5 Save
6 Check room .yy
TagsIDE, room_editor, RoomEditor
2.x IDE Found In9.2.1.1477
2.x Runtime Found In9.9.1.1091
2.x IDE Verified In2.2.1.360
2.x Runtime Verified In2.2.1.272

Activities

YellowAfterlife

2018-07-19 23:46

Developer  

a_bug.yyz (19,667 bytes)

Sam Cumming

2018-07-20 09:43

Developer   ~0060908

Last edited: 2018-07-20 09:55

View 2 revisions

Confirmed that this is still an issue in 2.1.5.243. Like YAL says, the JSON expects all backslashes to be escaped or a complete control character. The IDE should validate backslashes (i.e by escaping them) while writing to the JSON to prevent this sort of issue (though I'd imagine this would involve some work as afaik there's no validation process at all for instance variable strings).

Dan

2018-07-20 10:00

Adminstrator   ~0060909

The original reports for 0029300 specific to the \n character being in your strings is fixed, but a wider issue of typing \ or / on its own is not fixed yet.

Steven Campbell

2018-10-01 09:59

Manager   ~0061681

Fixed in Red IDE/GitHub Pull Request 4301
Git Id: bd35a821f1442f4b8d0ae68420e05d80db798b69