Jump to content

InteractionTarget network rpc doesn't validate x and z parameters


hoxi
  • Fixed

This is something that got introduced with the last beta update, the addition of x and z here. It's not in the live branch.

	InteractionTarget = function(player, action, target, x, z)
		if not (optnumber(action) and
				optentity(target))
		then
			printinvalid("InteractionTarget", player)
			return
		end
		local playercontroller = player.components.playercontroller
		if playercontroller then
            local pos
			if x then
				-- local x1, z1 = ConvertPlatformRelativePositionToAbsolutePosition(x, z, platform, platform_relative)
				if not IsPointInRange(player, x, z) then
					print("Interaction Target out of range")
					return
                else
                    pos = Vector3(x, 0, z)
				end
			end
			playercontroller:OnRemoteInteractionTarget(action, target, pos)
		end
	end,

x and z could be something other than a number, and easily crash the server.


Steps to Reproduce

Self-explanatory.

  • Like 1
  • Thanks 1
  • Big Ups 1



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...