Page 1 of 1

A filesystem tree to choose a download location in the Web UI

Posted: Wed Jan 10, 2024 1:38 pm
by rtp
Hello,

i'm wondering whether a certain feature would be accepted. Namely, selecting a download location in the Web UI, by introducing an additional JSON-RPC endpoint (? i don't know the terminology of JSON-RPC) that scans for directories on the filesystem. Like so:
deluge.gif
deluge.gif (505.67 KiB) Viewed 11558 times
The AUTH_LEVEL for the endpoint (or RPC method) is DEFAULT so NORMAL. Is this enough protection?

The endpoint spawns piped processes and returns the output:

Code: Select all

tree -dfJL 1 --noreport | jq <rename "name" key to "id" key; del .type; del .target; .text = file's basename>
Im packaging into a docker image based on debian so for me the above isn't a problem, if i remember correctly jq builds aren't available on windows.

Are there any security issues with this solution that i should be aware of?

Also, i could not get TreeLoader.directFn to work, is it bugged on Extjs 3.4?

Thanks for your time.

Re: A filesystem tree to choose a download location in the Web UI

Posted: Wed Jan 10, 2024 3:10 pm
by ambipro
Being able to transverse the file system always has inherent risks, but you can always submit a PR and have Cas take a look at the proposal if you want to get this implemented. I see a benefit if its done properly, although I just use thin-client and have only looked at the WebUI here and there to debug in inspect mode for the JSON-RPC endpoint.

Can't give you much insight on the implementation, but I would expect that piping terminal output back into Python is probably not the approach to PR and would be able to be done natively in Python.

I hope I understand your post well enough to at least add something here.

Re: A filesystem tree to choose a download location in the Web UI

Posted: Wed Feb 07, 2024 6:33 pm
by novelkeny
Would be nice if we can have this for the thin client.