vorta icon indicating copy to clipboard operation
vorta copied to clipboard

Vorta stalls refreshing archive listing on imported settings.db

Open erenfro opened this issue 2 years ago • 7 comments

Description

Vorta is not setting BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK when refreshing archives on a remote repository that's been imported by way of importing settings.db. This causes Vorta, when in this situation, at least in the Flatpak, to stall while refreshing archives, and never complete.

I was able to reproduce the issue.

Environment

  • OS: Pop! OS 22.04
  • Vorta version: 0.8.10
  • Installed from: Flatpak
  • Borg version: 1.2.3

Logs

{"type": "log_message", "time": 1675866633.2972302, "message": "Remote: Warning: No xauth data; using fake authentication data for X11 forwarding.", "levelname": "WARNING", "name": "root"} 
{"type": "log_message", "time": 1675866633.297442, "message": "Remote: X11 forwarding request failed on channel 0", "levelname": "WARNING", "name": "root"}                                  
{"type": "log_message", "time": 1675866634.6008136, "message": "Remote: Using a pure-python msgpack! This will result in lower performance.", "levelname": "WARNING", "name": "borg.archiver"
}                                                                                                                                                                                            
{"type": "question_prompt", "msgid": "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK", "message": "Warning: Attempting to access a previously unknown unencrypted repository!\nDo you want to con
tinue? [yN] "}
^C^C{"type": "log_message", "time": 1675866646.498447, "message": "Keyboard interrupt", "levelname": "ERROR", "name": "borg.archiver"}

erenfro avatar Feb 08 '23 15:02 erenfro

Would setting this env var for every operation increase the security risk?

real-yfprojects avatar Feb 08 '23 17:02 real-yfprojects

I would think so, yes. I'd have likely detected the message, and allowed user input to respond about it to proceed, right now, it's just doing nothing, and stalling on it.

erenfro avatar Feb 08 '23 17:02 erenfro

So you would propose showing a small dialog (QMessageBox) asking the user whether he is ok with unencrypted repo access?

real-yfprojects avatar Feb 08 '23 17:02 real-yfprojects

I think that would be ultimately the best option. Let the user confirm, interactively.

erenfro avatar Feb 08 '23 17:02 erenfro

Can you assign this to me, I would like to work on this.

AdwaitSalankar avatar Mar 27 '23 18:03 AdwaitSalankar

@real-yfprojects Could you guide me to where the repositories are being loaded from settings.db? Seems the flag is always set as yes in BorgInfoRepoJob : https://github.com/borgbase/vorta/blob/466597207666996629e2f49cbd5482760b84c38b/src/vorta/borg/info_repo.py#L39

AdwaitSalankar avatar Jan 21 '24 19:01 AdwaitSalankar

Could catch. Which you borg command were you using @erenfro? (The logs will tell).

real-yfprojects avatar Jan 22 '24 20:01 real-yfprojects