:SetTeleportData() can silently break teleport data on invalid UTF-8

This is focusing on teleports initiated by the serverside

If the server initiates a teleport with custom teleport data that is not valid UTF-8 (e.g. "hey\128!"), not only will the TeleportData index of Player:GetJoinData() be completely missing on the server, but it will also completely remove the SourceGameId and SourcePlaceId values from the teleport data, leaving just LaunchData. Interestingly, the teleport data still exists completely fine if instead fetched from a local script via :GetLocalPlayerTeleportData()

Maybe sending invalid UTF-8 shouldn’t be possible for whatever reason depending on how the teleport data works, but at the very least there should be an explicit error or warning, since right now the teleport data can magically look like a client-initiated teleport (no SourceGameId or SourcePlaceId) when it isn’t, which was annoying to try solve

2 Likes

Hi, this should be addressed now. SourceGameId and SourcePlaceId should not be removed from TeleportData, and a warning will be printed to console. It may be hard to catch the warning before the teleport occurs, but you can see it in the Error Report within Creator Hub.

Thank you for helping us improve the teleports API!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.