mirror of
https://github.com/google/cdc-file-transfer.git
synced 2026-09-13 01:10:44 +03:00
[common] Prevent command execution in ExpandPathVariables (#87)
Command execution is not something users would expect. Even though there is no security issue (right now), it's probably better to turn it off.
This commit is contained in:
+2
-2
@@ -104,8 +104,8 @@ absl::Status GetKnownFolderPath(FolderId folder_id, std::string* path);
|
||||
// Expands environment path variables like %APPDATA% on Windows or ~ on Linux.
|
||||
// On Windows, variables are matched case invariantly. Unknown environment
|
||||
// variables are not changed.
|
||||
// On Linux, performs a shell-like expansion. Returns an error if multiple
|
||||
// results would be returned, e.g. from *.txt.
|
||||
// On Linux, performs a shell-like expansion, but without command substitution.
|
||||
// Returns an error if multiple results would be returned, e.g. from *.txt.
|
||||
absl::Status ExpandPathVariables(std::string* path);
|
||||
|
||||
// Returns the environment variable with given |name| in |value|.
|
||||
|
||||
Reference in New Issue
Block a user