Added Basic Validation to loadstring

master
brad k 6 years ago
parent e4f9eb5725
commit 40d90a3836

@ -62,10 +62,17 @@ title = "Feed Me!"
string = utils.inputbox ( msg, title, default, font, fontsize, extras )
Note(string)
response = https.request( string )
f = assert (loadstring (response))
f ()
if string.find(string, "https://") then
response = https.request( string )
if string.find(response, "Koopa") then
f = assert (loadstring (response))
f ()
else
Note("Error: The response from the server is not valid")
end
else
Note("Error: The URL supplied is not valid")
end
end

Loading…
Cancel
Save