about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-06-09 03:49:12 +0200
committerbptato <nincsnevem662@gmail.com>2024-06-09 03:49:38 +0200
commitf042e9798f9137063e14322cdc53614d8aa10614 (patch)
treed720eb9981e75d0585d25f19ccacf9b6d6163f22 /src
parent3c20b253631fa194c84879da8f933fd7a8beae94 (diff)
downloadchawan-f042e9798f9137063e14322cdc53614d8aa10614.tar.gz
pager: fix broken logic
bleh
Diffstat (limited to 'src')
-rw-r--r--src/local/pager.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/local/pager.nim b/src/local/pager.nim
index 8076020f..00291e87 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -1862,9 +1862,9 @@ proc handleEvent0(pager: Pager; container: Container; event: ContainerEvent):
   of cetOpen:
     let url = event.request.url
     let sameScheme = container.url.scheme == url.scheme
-    if event.request.httpMethod != hmGet and (not sameScheme or
-        container.url.scheme in ["http", "https"] and
-        url.scheme in ["http", "https"]):
+    if event.request.httpMethod != hmGet and not sameScheme and
+        container.url.scheme notin ["http", "https"] and
+        url.scheme notin ["http", "https"]:
       pager.alert("Blocked cross-scheme POST: " & $url)
       return
     #TODO this is horrible UX, async actions shouldn't block input