nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.99k stars 784 forks source link

[Bug]: nextcloud client failed to parse netrc #7177

Open 130e opened 5 days ago

130e commented 5 days ago

⚠️ Before submitting, please verify the following: ⚠️

Bug description

After upgrading to 3.14.0, nextcloud client commandline (nextcloudcmd) failed to parse netrc credential with -n option. As a result, nextcloud server prompt for credential.
On the other hand, using --user and --password options work.

Steps to reproduce

  1. Create the file ~/.netrc as:
    default
    login admin
    password mypassword
  2. Run nextcloudcmd from bash.
    nextcloudcmd -n --path /Documents /home/user/Nextcloud/Documents/ https://myserver.com
  3. nextcloudcmd failed to parse netrc and prompt for credentials.
    09-20 17:27:56:193 [ debug default ]    [ OCC::NetrcParser::parse ]:    error fetching value for "default\nlogin admin\npassword mypassword\n"
    Please enter username:

Expected behavior

nextcloudcmd should parsed netrc.

Which files are affected by this bug

netrc

Operating system

Linux

Which version of the operating system you are running.

NixOS 24.11.20240919.c04d565 (Vicuna) x86_64

Package

Distro package manager

Nextcloud Server version

29.0.4

Nextcloud Desktop Client version

3.14.0

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

Nextcloud Server logs

No response

Additional info

No response

freundhein commented 4 days ago

Same here, on:

I have evidence that it synced normally before the latest update of nextcloudcmd, i.e. before 2024-09-16