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

How to prevent DOM object access by lua, but keep variable transfer between js & lua ? #76

Open
Flash-ang opened this issue Feb 26, 2023 · 1 comment

Comments

@Flash-ang
Copy link

example to add script from lua :

<script type="application/lua">

local js = require "js"
local g = js.global;
local window = js.global;
local document = window.document

s = document:createElement('script');
s.src = "https://www.domain.com/js/grab_info.js";
document:getElementsByTagName("head")[0]:appendChild(s);

</script>
@daurnimator daurnimator transferred this issue from fengari-lua/fengari Mar 23, 2023
@daurnimator
Copy link
Member

but keep variable transfer between js & lua ?

This is unlikely to be possible: it's too easy to escape if you have a javascript object, as you can e.g. look at Object.prototype and such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants