Fix ProcessManager::obscure to handle secrets starting with hyphens#9
Fix ProcessManager::obscure to handle secrets starting with hyphens#9insign wants to merge 1 commit into
ProcessManager::obscure to handle secrets starting with hyphens#9Conversation
The `rclone obscure` command interprets secrets starting with a hyphen (like `-password`) as command flags, resulting in a fatal error. Adding `--` to the command arguments correctly forces the secret to be treated as a positional argument. Co-authored-by: insign <1113045+insign@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
The
ProcessManager::obscuremethod uses therclone obscurecommand to obscure secrets. If the user passes a password or secret that begins with a hyphen (e.g.-password),rclone obscureinterprets this as a flag and fails. Adding--prevents rclone from interpreting following arguments as flags.This commit includes the fix in
src/ProcessManager.phpand adds a test case intests/Unit/EdgeCasesTest.phpto verify the fix works as expected.PR created automatically by Jules for task 13519567738473871618 started by @insign