Password field is not getting encrypted for some specific strings

Hello Experts,

I am using Rclone in RCD mode and creating remotes via an api.
I am facing an issue with SFTP based remote now where the same works fine with command line mode but issue faced with api (rcd) mode.

Sample request:
http://localhost:5572/config/create
{
"name": "sftp_rcd_api",
"type": "sftp",
"parameters": {
"host": "testsftp.com",
"user":"testuser",
"pass":"beXekBW2LtvkdrhY0YxZ3AB6Ll6pm1p3",
"port":"22"
}
}

With the above request SFTP remote is getting created but the password field ("pass") is not getting encrypted when I create it from api, and due to that I am unable to connect to SFTP using this remote.

There are 3 examples of remotes I tested:


[sftp_commandline]
type = sftp
host = testsftp.com
user = testuser
pass = MsbcEFA621BMeNp_H7jHmuJeMXkXdPB6Pt-sYAmJh8bnDIV-ZIvF-9Zr3Ms7edd0

[sftp_rcd_api]
type = sftp
host = testsftp.com
pass = beXekBW2LtvkdrhY0YxZ3AB6Ll6pm1p3
port = 22
user = testuser

[sftp_rcd_api_2]
type = sftp
host = testsftp.com
pass = meNM3fxwS_61CzRLnnKF-GVzR1px8JzMqP4RSz0qGPhQ4oIXdwK3knITFIWfykeL9Q
port = 22
user = testuser

Case 1 - remote "sftp_commandline": its created from command line where password is "beXekBW2LtvkdrhY0YxZ3AB6Ll6pm1p3" and it got encrypted and so remote is working fine.

Case 2 - remote "sftp_rcd_api": Its created from remote api and password is not getting encrypted and so remote is not working when I try connecting to sftp server.
password is "beXekBW2LtvkdrhY0YxZ3AB6Ll6pm1p3"

Case 3 - remote "sftp_rcd_api_2": In this case I just appended one extra character to the same password "beXekBW2LtvkdrhY0YxZ3AB6Ll6pm1p3A" and created using same api mode and it works as expected ! password is getting encrypted in remote.

As of now we are facing this issue for 2 different password strings -
beXekBW2LtvkdrhY0YxZ3AB6Ll6pm1p3
jWN2B0NLP1HxzC24SE58VfQq12JMbjF4

Note that, if I update only the password for this remote "sftp_rcd_api" from command line mode then this remote will start working.

Request your advice on this issue

rclone v1.63.1

  • os/version: Microsoft Windows 11 Pro 24H2 (64 bit)
  • os/kernel: 10.0.26100.2033 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.20.6
  • go/linking: static
  • go/tags: cmount

Thanks
Mahendra

Saw an option of obscure -

tried below request and remote working fine now. Want to confirm this is the right way or any other approach?

{
"name": "sftp_rcd_api_force_encrypt",
"type": "sftp",
"parameters": {
"host": "sxxxxxxx.com",
"user":"sxxxxxxxd",
"pass":"beXekBW2LtvkdrhY0YxZ3AB6Ll6pm1p3",
"port":"22"
},
"opt":{
"obscure":true
}

}

If the password parameter is 22 characters or longer and consists only of base64 characters then rclone can get confused about whether the password is already obscured


that is an old version. can rclone selfupdate

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.