Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Local folder or drive" destination folders containing the @ symbol corrupts the destination #2681

Open
jj-uk opened this issue Sep 1, 2017 · 8 comments

Comments

@jj-uk
Copy link

jj-uk commented Sep 1, 2017

I have:

  • [ x] searched open and closed issues for duplicates

Version info

Duplicati Version: 2.0.2.1
Operating System:
WINDOWS 7

Backend:
WINDOWS 7 (same machine)

Bug description

When editing an existing job, the destination path is corrupted if the destination folder contains the @ symbol.

Steps to reproduce

  • Via the localhost web browser:

  • Create a folder: c:\@folder\ in windows explorer.

  • Create a new "Storage Type=Local folder or drive" backup:

  • no encryption.

  • Set destination to c:\@folder\ using the folder picker tool.

  • Click Test connection (BUG: it incorrectly shows that the destination does not exist, click no to the popup). Ignore this bug for now.

  • Select "my documents" as the source, and select all other defaults, click save.

  • Export the job. (job is ok)

  • Edit the job that was just created.

  • Click "2 Destination"

  • BUG: The folder path, username and password are corrupt. Saving the job will corrupt the job.

  • Save job.

  • Export the job and compare it to the 1st export above. Notice that the folder path is as follows:
    "TargetURL": "file://folder\\/?auth-username=C&auth-password=%5C",

  • If you go into the edit job screen, don't change anything and save, the folder is corrupted again.
    Reproduce:
    Edit the job, Fix the destination, save. Export. (this is a valid job).
    Edit the job, Go to "5 options". Save job (no changes were made to the job). Export. (this is a corrupted job)
    The exported job folder is corrupted, even though the destination tab was not edited or even viewed.

  • Performing the above with the destination folder called c:\folder instead of c:\@folder works as expected. The @ symbol is causing the corruption.

@jj-uk jj-uk changed the title Editing an existing "Local folder or drive" config currupts the destination "Local folder or drive" destination folders containing the @ symbol corrupts the destination Sep 1, 2017
@CodeSlinger69
Copy link

I came here for a similar problem. I am trying to backup files whose names contain the "@" character. My company by default names our Outlook .ost files with the @ character included. For example, "first.last@company.com.ost".

Duplicati chokes on this file with the following warning (private info obfuscated):
"Warnings: [
Error reported while accessing file: C:\Users\xxx\AppData\Local\Microsoft\Outlook\first.last@company.com.ost => (2) The system cannot find the file specified: [\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy2\Users\xxx\AppData\Local\Microsoft\Outlook\first.last@company.com.ost]
]"

I'm running version 2.0.2.1_beta_2017-08-01.

@kenkendk
Copy link
Member

kenkendk commented Sep 5, 2017

@CodeSlinger69 I think your issue is different, as it fails during the backup.

The OP problem is the parser that attempts to parse the URL's.
It is a relaxed URL parser that supports using an url-like format.

For the file://, it parses this as file://server@user:pass which is causing the problem.
To work around it, you can url-encode the @ character so you get:

C:\%40folder\

@CodeSlinger69
Copy link

@kenkendk I'm sure you are right, that the problem is likely different root causes in the code base. I just found it kind of coincidental that I was having @ symbol problems at the same time that @JoeB99 was having @ symbol problems.

I do intend to look at the code and see where my problem is arising from. Just need to find the time...

@CodeSlinger69
Copy link

Well, I cloned this project, and am trying to find where in this code base the local files are opened for further processing. This thing is huge...anyone have a pointer on where I can start looking?

@kenkendk
Copy link
Member

This is the function that processes all files and folders:
https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Main/Operation/BackupHandler.cs#L936

@mapl
Copy link

mapl commented Dec 26, 2017

any progress so far on this issue?

@JonMikelV
Copy link
Contributor

@duplicatibot
Copy link

This issue has been mentioned on Duplicati. There might be relevant details there:

https://forum.duplicati.com/t/using-in-folder-names/15707/20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants