image-syncer icon indicating copy to clipboard operation
image-syncer copied to clipboard

对于auth中有特殊符号$的用户名被错误替换

Open yeluolei opened this issue 1 year ago • 1 comments

Bug Report

Type: bug report

What happened

有的用户名是个placehold,如

xxx repositiory: username: $oauthtoken passworld: xxxx

What you expected to happen

这里的 $oauthtoken 因为找不到环境变量,在auth的时候替换成了空用户名

How to reproduce it (as minimally and precisely as possible)

设置任何带有$ 符号的用户名密码都会出错

Anything else we need to know?

Environment

  • image-syncer version: 1.5.4
  • OS (e.g. cat /etc/os-release):
  • Registry version (e.g. habor):
  • Others:

yeluolei avatar Jul 18 '24 06:07 yeluolei

可以试试使用\来escape掉$,在os.ExpandEnv中他是起作用的。 xxx repositiory: username: \$oauthtoken passworld: xxxx

veraicon avatar Aug 15 '24 07:08 veraicon