Skip to content

Commit ee51069

Browse files
committed
Update sh_url.lua
1 parent ea168c2 commit ee51069

File tree

1 file changed

+2
-4
lines changed
  • workshop/gamemodes/cinema_modded/gamemode/extensions

1 file changed

+2
-4
lines changed

workshop/gamemodes/cinema_modded/gamemode/extensions/sh_url.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ local string_GetExtensionFromFilename = string.GetExtensionFromFilename
4747
local string_Explode = string.Explode
4848
local table_insert = table.insert
4949
local table_concat = table.concat
50-
local PrintTable = PrintTable
5150
module("url")
5251

5352
-----------------------------------------------------------------------------
@@ -584,7 +583,7 @@ end
584583
-- Returns: table with parsed URL components or nil if security validation fails
585584
--
586585
-- Security features applied automatically:
587-
-- • Protocol validation (only allows http, https, ftp)
586+
-- • Protocol validation (only allows http, https)
588587
-- • Parameter sanitization (removes script injection patterns)
589588
-- • XSS prevention (escapes dangerous HTML characters)
590589
-- • Directory traversal protection (blocks ../ path attacks)
@@ -619,7 +618,7 @@ function parse2(url, default)
619618
if not parsed then return end
620619

621620
-- Validate URL protocol against whitelist
622-
-- Only http, https, and ftp are allowed to prevent code injection
621+
-- Only http and https are allowed to prevent code injection
623622
if parsed.scheme and not isAllowedProtocol(parsed.scheme) then
624623
return nil -- Dangerous protocol detected
625624
end
@@ -756,7 +755,6 @@ function parse2(url, default)
756755
end
757756
end
758757

759-
PrintTable(parsed)
760758
return parsed
761759
end
762760

0 commit comments

Comments
 (0)