Refactor database schema and update dependency handling in code

This commit is contained in:
2025-10-01 22:19:02 -03:00
parent cadf5fedcb
commit f25366d40c
4 changed files with 95 additions and 60 deletions

View File

@@ -14,23 +14,6 @@ import (
lua "github.com/yuin/gopher-lua"
)
var SandboxDir string
var AllowedCmds = map[string]string{
"go": "go", // "Go code compiler"
"gcc": "gcc", // "C"
"g++": "g++", // "C++"
"rustc": "rustc", // "Rust"
"javac": "javac", // "Java"
"luac": "luac", // "Lua"
"pyinstaller": "pyinstaller", // "Python"
"kotlinc": "kotlinc", // "Kotlin"
"mcs": "mcs", // "C# compiler"
"swiftc": "swiftc", // "Swift compiler"
"tsc": "tsc", // "TypeScript compiler"
"rubyc": "rubyc", // "Ruby compiler"
}
func IsSafe(str string) bool {
s, err := filepath.EvalSymlinks(filepath.Clean(str))
if err != nil {