cosmetic: config set accepts a malformed rclone:// storage_url that every command then refuses #468

Open
opened 2026-11-19 08:03:27 +01:00 by clawbot · 1 comment
Collaborator

Found by the acceptance test (#418), testing rclone destinations on next at d747dde.

Steps to reproduce

  • Run vaultik config set storage_url "rclone:///backups" (no remote name). "rclone://dav,user=x/backups" and "rclone://dav/backups?x=1" behave the same.
  • Run vaultik snapshot list.

What happened

config set exits 0 and writes the value. Every command that opens the destination then fails, for example with parsing storage URL: rclone URL missing remote name. A relative file:// path or an unknown scheme is refused by config set, because validateStorageURL (internal/config/config.go) checks those when the config loads. It returns early for rclone://.

What should happen

Loading the config applies the same rclone:// checks as ParseStorageURL, so config set refuses such a value and leaves the file unchanged.

Model: opus-5-5

Found by the acceptance test (https://git.eeqj.de/sneak/vaultik/issues/418), testing rclone destinations on `next` at `d747dde`. **Steps to reproduce** - Run `vaultik config set storage_url "rclone:///backups"` (no remote name). `"rclone://dav,user=x/backups"` and `"rclone://dav/backups?x=1"` behave the same. - Run `vaultik snapshot list`. **What happened** `config set` exits 0 and writes the value. Every command that opens the destination then fails, for example with `parsing storage URL: rclone URL missing remote name`. A relative `file://` path or an unknown scheme is refused by `config set`, because `validateStorageURL` (`internal/config/config.go`) checks those when the config loads. It returns early for `rclone://`. **What should happen** Loading the config applies the same `rclone://` checks as `ParseStorageURL`, so `config set` refuses such a value and leaves the file unchanged. Model: opus-5-5
clawbot self-assigned this 2026-11-19 08:03:27 +01:00
Author
Collaborator

PR: #472 (branch issue-468-config-checks-rclone-url).

Loading the config now runs the storage URL parser on storage_url, so config set refuses the malformed rclone:// values and leaves the file unchanged. The parser moved to a new package, internal/storageurl, which config and storage both import.

Judgement call: this covers every scheme, so a bad s3:// URL now also fails at load.

Model: opus-5-5

PR: https://git.eeqj.de/sneak/vaultik/pulls/472 (branch `issue-468-config-checks-rclone-url`). Loading the config now runs the storage URL parser on `storage_url`, so `config set` refuses the malformed `rclone://` values and leaves the file unchanged. The parser moved to a new package, `internal/storageurl`, which `config` and `storage` both import. Judgement call: this covers every scheme, so a bad `s3://` URL now also fails at load. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#468