9001 / 9001/copyparty

`sel`-ecting a deleted file in `up2k` leads to the crash page

Offen
#1,516 2 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @9001 Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
46.6k
Forks
1.9k
Ø Merge
10 T. 16 Std.
Gemergte PRs (30 T.)
5

Beschreibung

### Describe the bug
In `up2k` mode, you can view a file by visiting a URL that looks as follows `http:////?doc=.#`. If you have the necessary rights, you can delete it by clicking the `sel` button and then clicking `del` on the panel at the bottom right corner. After confirming the deletion, a user is not redirected anywhere and instead remains on the file view (which is already deleted). By pressing `sel` again, the crash page appears.

### To Reproduce
1. Go to `up2k` page;
2. Upload a file, in my case it's `.txt`;
3. View the file contents by visiting `http:////?doc=.#`;
4. Press `sel`;
5. Press `del`;
6. Confirm deletion;
7. Press `sel` again.

### Expected behavior
After the deletion, a user is redirected elsewhere from the deleted file view.

### Screenshots

Image

### Server details (if you're NOT using docker/podman)
remove the ones that are not relevant:
* **what copyparty did you grab:** sfx
* **how you're running it:** in a terminal
* run copyparty with `--version` and grab the last 3 lines (they start with `copyparty`, `CPython`, `sqlite`) and paste them below this line:

```
copyparty v1.20.16 "sftp is fine too" (2026-05-26)
CPython v3.13.12 on Linux64 [GCC 15.2.0]
sqlite 3.46.1*1 | jinja 3.1.6 | pyftpd 1.5.10 | tftp 0.4.0 | miko 4.0.0
```

* **copyparty arguments and/or config-file:**

```bash
python copyparty-sfx.py -a admin:admin -a writer:w --sftp 3922 --sftp-pw -v /home/alt/tmp/copyparty/cp-sftp-wo:v:w,writer:A.,admin
```

> I assume sftp options are redundant here, but keeping it as-is

### Server log
No new logs show up after the second click on `sel` which leads to crash, but latest deletion logs are as follows:

```
23:23:59.012 127.0.0.1 35360 POST /v/ @admin
23:24:00.444 127.0.0.1 35360 GET /v/candidate-names.txt @admin
23:24:00.444 127.0.0.1 35360 /v/candidate-names.txt plain 304
23:24:03.873 127.0.0.1 35360 POST /v/candidate-names.txt?delete @admin
23:24:03.873 up2k rm 'v/candidate-names.txt'
'/home/alt/tmp/copyparty/cp-sftp-wo/candidate-names.txt'
23:24:03.873 up2k forgetting 'candidate-names.txt'
23:24:03.873 127.0.0.1 35360 deleted 1 files (and 0/0 folders)
23:24:03.879 127.0.0.1 35360 GET /v/?tree=&dots @admin
23:24:03.879 127.0.0.1 35370 GET /v/?ls&dots&rtt=6 @admin
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.