mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-29 05:02:46 +00:00
remove non UTF-8 characters on get and send strings
This commit is contained in:
parent
e3ba1a053c
commit
f9c107850a
@ -101,7 +101,7 @@ upload_file(){
|
|||||||
[[ "$file" = *'..'* ]] && return # no directory traversal
|
[[ "$file" = *'..'* ]] && return # no directory traversal
|
||||||
[[ "$file" = '.'* ]] && return # no hidden or relative files
|
[[ "$file" = '.'* ]] && return # no hidden or relative files
|
||||||
if [[ "$file" = '/'* ]] ; then
|
if [[ "$file" = '/'* ]] ; then
|
||||||
[[ ! "$file" =~ "$FILE_REGEX" ]] && return # absulute must match REGEX
|
[[ ! "$file" =~ $FILE_REGEX ]] && return # absulute must match REGEX
|
||||||
else
|
else
|
||||||
file="${UPLOADDIR:-NOUPLOADDIR}/${file}" # othiers must be in UPLOADDIR
|
file="${UPLOADDIR:-NOUPLOADDIR}/${file}" # othiers must be in UPLOADDIR
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user