mirror of
https://github.com/rclone/rclone.git
synced 2026-11-07 18:22:55 -05:00
fs: reject --bwlimit times without a colon or with signed digits
validateHour only checked the length of the hh:mm field and then parsed the two halves with strconv.Atoi. It never checked the third character, so "10h20" or "Mon-10.20" were accepted as 10:20, and since Atoi accepts a sign, "+1:00" and "Mon-10:+5" were accepted as 01:00 and 10:05. Require the colon and four digits so these are reported as invalid time specifications like other malformed times.
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f