added check for absolute path to supplied paths

This commit is contained in:
Asif Bacchus 2019-01-08 01:59:45 -07:00
parent 746144e40a
commit 02489e6813
2 changed files with 21 additions and 5 deletions

View File

@ -6,7 +6,7 @@
-1,
19,
54,
758,
774,
68,
-1,
-1,

View File

@ -320,7 +320,7 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
echo -e "\n${cyan}---exiting---\n${norm}"
exit 1
;;
*)
/*)
# validate path
if [ -f "${inputCertPath}" ]; then
CertPath="${inputCertPath}"
@ -346,6 +346,10 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
fi
fi
;;
*)
# path must be absolute and start with a slash
echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}"
;;
esac
done
@ -360,7 +364,7 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
echo -e "\n${cyan}---exiting---\n${norm}"
exit 1
;;
*)
/*)
# validate path
if [ -f "${inputKeyPath}" ]; then
KeyPath="${inputKeyPath}"
@ -386,6 +390,10 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
fi
fi
;;
*)
# path must be absolute and start with a slash
echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}"
;;
esac
done
@ -409,7 +417,7 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
echo -e "\n${cyan}---exiting---\n${norm}"
exit 1
;;
*)
/*)
# validate path
if [ -f "${inputCAChainPath}" ]; then
CAChainPath="${inputCAChainPath}"
@ -435,6 +443,10 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
fi
fi
;;
*)
# path must be absolute and start with a slash
echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}"
;;
esac
done
fi
@ -488,7 +500,7 @@ while true; do
generateDH=1
break
;;
*)
/*)
# validate path
if [ -f "${inputDHPath}" ]; then
DHPath="${inputDHPath}"
@ -514,6 +526,10 @@ while true; do
fi
fi
;;
*)
# path must be absolute and start with a slash
echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}"
;;
esac
done
fi