aredn: Fix validateFirmwareFilename() on admin page (#150)

Co-authored-by: Phil Crump <phil.crump@goonhilly.org>
This commit is contained in:
Phil Crump 2021-10-22 22:02:15 +01:00 committed by GitHub
parent 304540d0e1
commit a6669cc53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -630,12 +630,13 @@ print <<EOF;
var searchstring = "";
var efn = "";
if(hwmfg != "cpe"){
if ($mfgprefix == "wbs") {
if (hwmfg == "wbs") {
searchstring= ".*wbs" + hwtype + "-sysupgrade.bin$\";
efn = "aredn-$fw_version-$mfgprefix${hardwaretypev}-sysupgrade.$
efn = "aredn-$fw_version-$mfgprefix${hardwaretypev}-sysupgrade.bin";
} else {
searchstring= ".*-" + hwtype + "-sysupgrade.bin$\";
efn = "aredn-$fw_version-$mfgprefix-${hardwaretypev}-sysupgrade.bin";
}
} else {
searchstring= ".*cpe" + hwtype + "-sysupgrade.bin$\";
efn = "aredn-$fw_version-$mfgprefix${hardwaretypev}-sysupgrade.bin";