Page 1 of 1

[1.1.101] load() returns nil after updating from 1.1.100 to 1.1.101

Posted: Thu Dec 28, 2023 11:21 am
by Samuel2507
After updating from 1.1.100 to 1.1.101 the behavior of load() seems to have changed / broken.
The mods i maintain use string.dump() and load() to copy functions, this worked until 1.1.100.

After updating to 1.1.101 load() just returns nil if fed with a string.dump( "Any function" ).

Example:

Create a random function:

Code: Select all

local test = function() return print("Hello world!") end
Call string.dump() and load() to copy the function:

Code: Select all

local dumped = string.dump(test)
local cloned = load(dumped)
Expected behavior:
As in 1.1.100, "cloned" contains a copy of "test"

Behavior in 1.1.101:
"cloned" is nil

A mod to reproduce this is attached.

Re: [1.1.101] load() returns nil after updating from 1.1.100 to 1.1.101

Posted: Thu Dec 28, 2023 1:54 pm
by Rseding91
Thanks for the report. This was an intended change (that we seem to have forgotten to add to the changelog). load(...) now will not load binary blobs due to security concerns.