mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Document internal usage of encode/decode_variant
This commit is contained in:
parent
f0326297b3
commit
dc70ab5e2d
@ -249,6 +249,7 @@
|
|||||||
<param index="0" name="allow_objects" type="bool" default="false" />
|
<param index="0" name="allow_objects" type="bool" default="false" />
|
||||||
<description>
|
<description>
|
||||||
Returns the next [Variant] value from the file. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
|
Returns the next [Variant] value from the file. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
|
||||||
|
Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method.
|
||||||
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
|
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
@ -447,6 +448,7 @@
|
|||||||
<param index="1" name="full_objects" type="bool" default="false" />
|
<param index="1" name="full_objects" type="bool" default="false" />
|
||||||
<description>
|
<description>
|
||||||
Stores any Variant value in the file. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
|
Stores any Variant value in the file. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
|
||||||
|
Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.
|
||||||
[b]Note:[/b] Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags.
|
[b]Note:[/b] Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<param index="1" name="allow_objects" type="bool" default="false" />
|
<param index="1" name="allow_objects" type="bool" default="false" />
|
||||||
<description>
|
<description>
|
||||||
Returns a decoded [Variant] corresponding to the Base64-encoded string [param base64_str]. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
|
Returns a decoded [Variant] corresponding to the Base64-encoded string [param base64_str]. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
|
||||||
|
Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method.
|
||||||
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
|
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
@ -52,6 +53,7 @@
|
|||||||
<param index="1" name="full_objects" type="bool" default="false" />
|
<param index="1" name="full_objects" type="bool" default="false" />
|
||||||
<description>
|
<description>
|
||||||
Returns a Base64-encoded string of the [Variant] [param variant]. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
|
Returns a Base64-encoded string of the [Variant] [param variant]. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
|
||||||
|
Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
<param index="0" name="allow_objects" type="bool" default="false" />
|
<param index="0" name="allow_objects" type="bool" default="false" />
|
||||||
<description>
|
<description>
|
||||||
Gets a Variant. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
|
Gets a Variant. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
|
||||||
|
Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method.
|
||||||
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
|
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
@ -49,6 +50,7 @@
|
|||||||
<param index="1" name="full_objects" type="bool" default="false" />
|
<param index="1" name="full_objects" type="bool" default="false" />
|
||||||
<description>
|
<description>
|
||||||
Sends a [Variant] as a packet. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
|
Sends a [Variant] as a packet. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
|
||||||
|
Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -109,6 +109,7 @@
|
|||||||
<param index="0" name="allow_objects" type="bool" default="false" />
|
<param index="0" name="allow_objects" type="bool" default="false" />
|
||||||
<description>
|
<description>
|
||||||
Gets a Variant from the stream. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
|
Gets a Variant from the stream. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
|
||||||
|
Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method.
|
||||||
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
|
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
@ -234,6 +235,7 @@
|
|||||||
<param index="1" name="full_objects" type="bool" default="false" />
|
<param index="1" name="full_objects" type="bool" default="false" />
|
||||||
<description>
|
<description>
|
||||||
Puts a Variant into the stream. If [param full_objects] is [code]true[/code] encoding objects is allowed (and can potentially include code).
|
Puts a Variant into the stream. If [param full_objects] is [code]true[/code] encoding objects is allowed (and can potentially include code).
|
||||||
|
Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
Loading…
Reference in New Issue
Block a user