owsd: fix origin whitelisting on https port 443

Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
This commit is contained in:
Denis Osvald 2016-10-20 16:04:26 +02:00 committed by Sukru Senli
parent b38c7fda35
commit 3f80217975
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=owsd
PKG_VERSION:=1.0.4
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=http://public.inteno.se/owsd.git

View file

@ -46,7 +46,7 @@ append_origin_parts() {
host="$2"
port="$3"
if [ "${proto}" = "https" ] && [ "${port}" -eq 443 ] || [ "${proto}" = "http" ] && [ "${port}" -eq 80 ]; then
if [ "${proto}" = "https" -a "${port}" -eq 443 -o "${proto}" = "http" -a "${port}" -eq 80 ]; then
append_origin "${proto}://${host}"
else
append_origin "${proto}://${host}:${port}"
@ -91,7 +91,7 @@ parse_owsd_iface() {
append_whitelists () {
config_list_foreach "$1" "origin" append_origin
if [ "$whitelist_dhcp_domains" == "1" ]; then
if [ "$whitelist_dhcp_domains" -eq 1 ]; then
for domain in $DHCP_DOMAINS; do
append_origin_parts "${http}" "${domain}" "${port}"
done