ソースを参照

Validation of domain server

Bob Mottram 9 年 前
コミット
108aa7831b
共有1 個のファイルを変更した8 個の追加0 個の削除を含む
  1. 8
    0
      src/freedombone-controlpanel

+ 8
- 0
src/freedombone-controlpanel ファイルの表示

482
     case $sel in
482
     case $sel in
483
         0)
483
         0)
484
             hubzilla_domain_server=$(<$data)
484
             hubzilla_domain_server=$(<$data)
485
+            if [[ $hubzilla_domain_server != *"."* ]]; then
486
+                return
487
+            fi
488
+            if [[ $hubzilla_domain_server != "https"* ]]; then
489
+                dialog --title "Hubzilla channel directory server" \
490
+                       --msgbox "Invalid domain - include the https://" 6 40
491
+                return
492
+            fi
485
             ./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
493
             ./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
486
             dialog --title "Hubzilla channel directory server" \
494
             dialog --title "Hubzilla channel directory server" \
487
                    --msgbox "Domain channel directory server changed to $hubzilla_domain_server" 6 40
495
                    --msgbox "Domain channel directory server changed to $hubzilla_domain_server" 6 40