Przeglądaj źródła

Fix off-by-one error when unassigning users from ips

Robert Zollner 5 lat temu
rodzic
commit
fc39fd0be2
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      func/ip.sh

+ 1 - 1
func/ip.sh

@@ -119,7 +119,7 @@ decrease_ip_value() {
 
     new_web=$((current_web - 1))
     check_ip=$(grep $sip $USER_DATA/web.conf |wc -l)
-    if [ "$check_ip" -lt 2 ]; then
+    if [[ $check_ip = 0 ]]; then
         new_usr=$(echo "$current_usr" |\
             sed "s/,/\n/g"|\
             sed "s/^$user$//g"|\