Skip to content

Implement ticket password feature in dl-cli.py#82

Open
egcmi wants to merge 2 commits into
DownloadTicketService:masterfrom
egcmi:master
Open

Implement ticket password feature in dl-cli.py#82
egcmi wants to merge 2 commits into
DownloadTicketService:masterfrom
egcmi:master

Conversation

@egcmi

@egcmi egcmi commented Apr 7, 2026

Copy link
Copy Markdown

Add ticket password generation using secrets module

Enable ticket password generation in configuration file by setting ticket_pass=TRUE. ticket_pass value must be boolean. the generated token will be printed to the console

Add ticket password generation using secrets module
@wavexx

wavexx commented Apr 7, 2026

Copy link
Copy Markdown
Member

This breaks the output interface though. $(dl-cli <something>) would now produce 2 lines, depending on config which would make scripting ugly.

I would prefer that the password is provided externally instead, via stdin or input file for example, like rsync does. This would still work very well with shell scripts, for example when using "pwgen" gives you full control:

umask 077
pwgen -1 > pass
dl-cli --password-file pass <file to upload>

Handling "--password-file=-" would be a bonus, but we do have /dev/stdin for this anyway. If you run dl-cli as a subprocess, stdin avoids the need to create temporary files entirely and is secure.

Added functionality to read ticket password from a file or stdin. Updated HTTP POST message to include ticket password if provided.
@egcmi

egcmi commented Jul 21, 2026

Copy link
Copy Markdown
Author

updated PR to read pw from password file or stdin according to feedback. removed ticket_pass parameter in config file as it's no longer needed. let me know what you think

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants