Skip to content
Permalink
Browse files Browse the repository at this point in the history
Update link_manager.php
probably better fix for #169
  • Loading branch information
MW0MWZ committed Oct 3, 2022
1 parent 1e46533 commit 0ad7d00
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dstarrepeater/link_manager.php
Expand Up @@ -10,7 +10,10 @@
if (preg_match('/[^A-Z]/',$_POST["Letter"])) { unset ($_POST["Letter"]);}
if (preg_match('/[^A-Z0-9 ]/',$_POST["Module"])) { unset ($_POST["Module"]);}
}

if ($_POST["Link"] == "UNLINK") {
if (preg_match('/[^A-Z0-9 ]/',$_POST["Module"])) { unset ($_POST["Module"]);}
}

if (empty($_POST["RefName"]) || empty($_POST["Letter"]) || empty($_POST["Module"])) { echo "Somthing wrong with your input, try again";}


Expand All @@ -22,8 +25,7 @@
}
$targetRef = $targetRef.$_POST["Letter"];
$targetRef = strtoupper($targetRef);
$module = substr($_POST["Module"], 0, 7);
$module = preg_replace("/[^a-zA-Z0-9]+/", "", $module);
$module = $_POST["Module"];

if (strlen($module) != 8) { //Fix the length of the module information
$moduleFixedCs = strlen($module) - 1; //Length of the string, -1
Expand Down

0 comments on commit 0ad7d00

Please sign in to comment.