Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC erroneously passes EncodedObjectAsId #28734

Closed
kiiada opened this issue May 7, 2019 · 4 comments
Closed

RPC erroneously passes EncodedObjectAsId #28734

kiiada opened this issue May 7, 2019 · 4 comments

Comments

@kiiada
Copy link

kiiada commented May 7, 2019

Godot version:
3.1.1

OS/device including version:

Windows 10 - client
Amazon linux on EC2 - server

Issue description:

An RPC function that previously worked in 3.0 was called with a reference to a node to translate the node to a preset position. RPC call failed as parameter received was of type EncodedObjectAsId.

Steps to reproduce:
Create a simple server/client architecture. Immediately after client joins and spawns a player object, attempt to use an rpc call to translate it to a new location

Minimal reproduction project:

@Faless
Copy link
Collaborator

Faless commented May 7, 2019

@kiidmale this was changed due to: #27395 (breaking compat).
See the release notes of 3.1.1 and #27485 .
Basically, you now need to set the NetworkedPacketPeer allow_object_decoding property to true (as was originally intended, but never implemented correctly until now).
This is done for security reason, as decoding objects allows remote code execution.

@kiiada
Copy link
Author

kiiada commented May 7, 2019

What is the recommended method of passing parameters to ensure that remote code execution attacks do not occur?

@Faless
Copy link
Collaborator

Faless commented May 7, 2019

What is the recommended method of passing parameters to ensure that remote code execution attacks do not occur?

Do not allow object encoding, and only use built-in types for RPCs (e.g. String, Vector, PoolVector, Transform, Array, Dictionary, etc, except Object of course).

@kiiada
Copy link
Author

kiiada commented May 7, 2019

Closing - appreciate the informative responses, @Faless

@kiiada kiiada closed this as completed May 7, 2019
@akien-mga akien-mga added archived and removed bug labels May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants