Page MenuHomeVyOS Platform

Passwords with special characters fail in commit-archive
Open, HighPublicBUG

Description

Passwords with special characters used in commit-archive fail:

# VyOS
vyos@cr01b-vyos# set interfaces dummy dum0 description "temporary description to force a commit proving it works before without special char"
[edit]
vyos@cr01b-vyos# commit
Using source address fd52:d62e:8011:6e:192:168:15:4
Archiving config...
  sftp://stor01z-cs.int.trae32566.org/cr01b-vyos  OK
[edit]
vyos@cr01b-vyos# delete system config-management commit-archive location 
[edit]
vyos@cr01b-vyos# set system config-management commit-archive location "sftp://cr01b:$T3$TP@$$W0^%@stor01z-cs.int.trae32566.org/cr01b-vyos"
[edit]
vyos@cr01b-vyos# commit
Using source address fd52:d62e:8011:6e:192:168:15:4
Archiving config...
  sftp://stor01z-cs.int.trae32566.org/cr01b-vyos curl: (6) Could not resolve host: 18274W0^%@stor01z-cs.int.trae32566.org
 Failed!
[edit]

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202005150117
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Passing passwords via command line arguments is very bad practice. Curl has a -u option, if passed just the user it prompts for the password on stdin. This can simply be passed via shell redirection.

erkin renamed this task from Passwords with Special Characters in Commit Archive Fai to Passwords with special characters fail in commit-archive.Aug 30 2021, 6:11 AM
erkin set Issue type to Bug (incorrect behavior).
erkin removed a subscriber: Active contributors.

The issue is raised in this forum query: https://forum.vyos.io/t/commit-archive-doesnt-accept-symbols-in-password/13817
Remote host having password with special character is not accepted using with scp command

vyos@test1# set system config-management commit-archive location scp://test:[email protected]/tmp

  "//test:[email protected]/tmp" is not a valid URI for the scp URL scheme


  Invalid value
  Value validation failed
  Set failed

Version:

vyos@test1# run sh ver
Version:          VyOS 1.5-rolling-202402120819
Release train:    current

Built by:         [email protected]
Built on:         Mon 12 Feb 2024 10:20 UTC
Build UUID:       b1a917a9-cda4-49ad-a327-58321f1067dc
Build commit ID:  8c5299e1cf7c7b
Viacheslav raised the priority of this task from Low to High.Feb 23 2024, 4:52 PM