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

send_file doesn't work for me #187

Open
HarrisMt opened this issue Jan 13, 2022 · 4 comments
Open

send_file doesn't work for me #187

HarrisMt opened this issue Jan 13, 2022 · 4 comments

Comments

@HarrisMt
Copy link

HarrisMt commented Jan 13, 2022

send_file "-781874795" "/var/www/tmp/download.png" "Lool"
bin/send_file.sh "-781874795" "/var/www/tmp/download.png" "Lool"

and doesn't get anything, but I send_message function is work for me to send messages.

@gnadelwartz
Copy link
Collaborator

by default file to send needs to be in "data-bot-bash" dir and absolute pathnames are not allowed

@HarrisMt
Copy link
Author

fine

@gnadelwartz
Copy link
Collaborator

gnadelwartz commented Jan 13, 2022

From send_file function reference: https://github.com/topkecleon/telegram-bot-bash/blob/master/doc/6_reference.md

For security reasons the following restrictions apply to local files:

absolute path name must match the shell regex FILE_REGEX
relative path name is threated as relative to UPLOADDIR (default: data-bot-bash/upload)
path must not start with ./ and not contain ../

@gnadelwartz
Copy link
Collaborator

but you raise a valid point, I will add error resposes to send _file in the next release

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

No branches or pull requests

2 participants