From bcbd6e01b1c4a76aa16a8f2730f3747e5081693b Mon Sep 17 00:00:00 2001 From: betalars Date: Mon, 14 Oct 2024 23:22:14 +0200 Subject: [PATCH] fix formatting mistakes in config file warning code block Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> --- doc/classes/ConfigFile.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index f7aa7261836a..9d54e9bd8fb4 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -164,15 +164,16 @@ Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed. - [b]Warning:[/b] Loading Data from a Config File may allow for remote code execution. This is non-trivial to midigate, but storing a [readme] file in the same directory can warn users against downloading untrusted configurations: + [b]Warning:[/b] Loading Data from a Config File may allow for remote code execution. This is non-trivial to midigate, but storing a [code]readme[/code] file in the same directory can warn users against downloading untrusted configurations: [codeblocks] [gdscript] var config_path = "user://" var config_file_name = "my_game.config" - # check if configuration has been initialized: + # Check if configuration has been initialized: if not FileAccess.file_exists("%s%s" % [config_path, config_file_name]): - var readme := FileAccess.open("%s%s" % [config_path, "README.txt"], FileAccess.WRITE) - readme.store_string("Caution: It is not advised to use Config-files you find online, as malicious files may compromise your device. ") + var readme = FileAccess.open("%s%s" % [config_path, "README.txt"], FileAccess.WRITE) + readme.store_string("Caution: It is not advised to use Config-files you find online, as malicious files may compromise your device.") + readme.close() [/gdscript] [/codeblocks]