From 7878e28027a11f845aef9e430a85cf84d09bb27f Mon Sep 17 00:00:00 2001 From: Alec Murphy Date: Thu, 10 Apr 2025 15:41:02 -0400 Subject: [PATCH] Applications/Internet/Cyberia: Fully resolve URLs in redirect --- Applications/Internet/Cyberia.app/Cyberia.HC | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Applications/Internet/Cyberia.app/Cyberia.HC b/Applications/Internet/Cyberia.app/Cyberia.HC index 67f83e3..8d290a7 100644 --- a/Applications/Internet/Cyberia.app/Cyberia.HC +++ b/Applications/Internet/Cyberia.app/Cyberia.HC @@ -184,7 +184,14 @@ U0 @cyberia_navigate() } if (resp->status.code == 301 || resp->status.code == 302) { - StrCpy(&addressbar1->text, resp->headers->@("Location")); + U8* unresolved_location = resp->headers->@("Location"); + if (!unresolved_location) + return; + U8* resolved_location = @resolve_href(browser->renderer, unresolved_location); + if (!resolved_location) + return; + StrCpy(&addressbar1->text, resolved_location); + Free(resolved_location); @cyberia_navigate; return; }