so-nice | Small Web interface to control iTunes | Music Player library
kandi X-RAY | so-nice Summary
kandi X-RAY | so-nice Summary
Small Web interface to control iTunes, Spotify, Rdio, MPD, Rhythmbox, Amarok and XMMS2. ♫
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parse the command
- Returns the player instance
so-nice Key Features
so-nice Examples and Code Snippets
Community Discussions
Trending Discussions on so-nice
QUESTION
I'm making a moddable game and thinking about using Lua as the language for my players to write their own scripts.
But like any programming language, Lua bound to have some "loopholes" for not-so-nice users to do bad things.
I'm new to Lua, so I don't really know what Lua "can" do.
I did a little reasearch online and found that Metatable
and ob.exit
could be used for doing bad things, is there any other things?
Could somebody please be so kind and give me a list of the things I should watch out and block it (maybe by replacing it with empty string)?
Much appreciated!
...ANSWER
Answered 2021-Jan-01 at 18:54Lua's built-in math
, string
, and table
libraries will always be safe. coroutine
is also safe, and extremely useful to some advanced lua programmers.
There are some other, not-so-safe libraries lua loads in by default (which you can easily disable)
os
lets you execute commands, and do other nasty things. However,os.time
andos.date
are useful functions, so keep those in.io
allows you to read- and edit- any file on the computer. Probably best to leave it out.debug
allows you to "reflect" on the program. This means that the program can edit certain parts about itself, and can be unwanted. It's a safe bet that user programs won't need this. Ever.
Instead of replacing something with an empty string, you can always replace it with setfenv
(Lua 5.1), like so:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install so-nice
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page