voice_client: ringing: prevent scheduler from creating malicious cronjobs #1008

This commit is contained in:
Jakob Olsson 2019-08-06 10:56:10 +02:00
parent 0c3b6e72f6
commit e39cbf8f5e

View file

@ -49,6 +49,11 @@ set_ringing_schedule() {
stop_hour=$(echo $stop | awk -F ':' '{print$1}')
stop_min=$(echo $stop | awk -F ':' '{print$2}')
[ "${start_min//[0-9]/}" = "" ] || return
[ "${start_hour//[0-9]/}" = "" ] || return
[ "${stop_min//[0-9]/}" = "" ] || return
[ "${stop_hour//[0-9]/}" = "" ] || return
daymatch=0
for day in $days; do
[ "${day:0:3}" == "$current_day" ] && daymatch=1