mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat: web dashboard and playground work
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch: accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes they need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
23
dCommon/Process.h
Normal file
23
dCommon/Process.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
// Run external programs without a shell: arguments are passed as a vector, so nothing in them is interpreted
|
||||
// ($(...), backticks, ;, quotes, redirections all stay literal).
|
||||
namespace Process {
|
||||
/**
|
||||
* Run a program and wait for it.
|
||||
* @param arguments The program (looked up on PATH when it has no slash) followed by its arguments
|
||||
* @param stdoutFile Where the program's standard output goes; empty discards it
|
||||
* @param stderrFile Where the program's error output goes; empty discards it
|
||||
* @return The program's exit code, or -1 when it could not be started or was killed by a signal
|
||||
*/
|
||||
int Run(const std::vector<std::string>& arguments, const std::string& stdoutFile = "", const std::string& stderrFile = "");
|
||||
|
||||
// Whether text contains characters a shell uses to run or chain commands (quotes, $, `, ;, |, &, <, >, newlines).
|
||||
// Parentheses, spaces and backslashes are allowed: they are common in real folder names.
|
||||
// Used to refuse suspicious paths even though Run never uses a shell.
|
||||
bool HasShellMetacharacters(std::string_view text);
|
||||
}
|
||||
Reference in New Issue
Block a user