dotnet / dotnet/command-line-api

Is it possible to pass additional arguments to an command ? Like some meta data ?

Open
#1,709 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Im using the command line API for my game server... i have several mods and admins sending commands from their client to the game server.

However, i need to check some commands for privileges to prevent abusing those commands.
Currently it looks a bit like this...

`/GiveItem -caller AdminName -to PlayerName -... other stuff` and the command acesses the caller option to check if the admin has the right to use this type of command... this is a bit ugly. The caller of the command shouldnt be passed as an option, this is also insecure because other admins without those rights could simply parse another admins name in that option to acess it.

Im looking for some type of security validation `root.Invoke(command, adminNameOrAccountOrWhatever, other stuff... )` this way the option could do the security validation without having the name passed as an option or argument.

I hope you all understand what i mean, im terrible at describing. Is there something like this build in ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.