diff --git a/app/fax/fax_edit.php b/app/fax/fax_edit.php index 083bd7201f..ca3e15ffff 100644 --- a/app/fax/fax_edit.php +++ b/app/fax/fax_edit.php @@ -87,6 +87,7 @@ //get the http post values and set them as php variables if (count($_POST) > 0) { + //set the variables $fax_name = check_str($_POST["fax_name"]); $fax_extension = check_str($_POST["fax_extension"]); $fax_accountcode = check_str($_POST["accountcode"]); @@ -124,6 +125,15 @@ $fax_description = check_str($_POST["fax_description"]); $fax_send_greeting = check_str($_POST["fax_send_greeting"]); $fax_send_channels = check_str($_POST["fax_send_channels"]); + + //restrict size of user data + $fax_name = substr($fax_name, 0, 30); + $fax_extension = substr($fax_extension, 0, 15); + $accountcode = substr($accountcode, 0, 80); + $fax_prefix = substr($fax_prefix, 0, 10); + $fax_caller_id_name = substr($fax_caller_id_name, 0, 20); + $fax_caller_id_number = substr($fax_caller_id_number, 0, 20); + $fax_forward_number = substr($fax_forward_number, 0, 20); } //delete the user from the fax users @@ -499,7 +509,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-name']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "".$text['description-name']."\n"; echo "\n"; @@ -510,7 +520,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-extension']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "".$text['description-extension']."\n"; echo "\n"; @@ -522,7 +532,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; if ($action == "add") { $fax_accountcode = $_SESSION['domain_name']; } - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-accountcode']."\n"; echo "\n"; @@ -544,7 +554,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-fax_prefix']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo " ".$text['description-fax_prefix']."\n"; echo "\n"; @@ -584,7 +594,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-caller-id-name']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "".$text['description-caller-id-name']."\n"; echo "\n"; @@ -595,7 +605,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-caller-id-number']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "".$text['description-caller-id-number']."\n"; echo "\n"; @@ -606,7 +616,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-forward']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "".$text['description-forward-number']."\n"; echo "\n";