mitchellkrogza / nginx-ultimate-bad-bot-blocker

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders
Other
3.82k stars 472 forks source link

[BUG] Typo in update-ngxblocker #376

Closed zjagust closed 4 years ago

zjagust commented 4 years ago

Describe the bug

You have a "typo" in update-ngxblocker script, line 268:

if [ -n "$(mail_path)" ]; then

Which results in the following when script is executed (with bash -xxx and -e $EMAIL parameter): find_binary mail local x= path= binary=mail 'bin_paths=/bin /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin /root/bin /root/.bin' for x in $bin_paths path=/bin/mail '[' -x /bin/mail ']' echo /bin/mail return local mail_path=/bin/mail mail_path update-ngxblocker: line 268: mail_path: command not found '[' -n '' ']' ... WARN: missing mail command => disabling emails.

Please remove parentheses around mail_path in if statement on line 268. Thank you in advance.