Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed an exploit. Thanks to xanaboy for finding it.

  • Loading branch information...
commit fe4070cc324bc3a287b3903ac967e5f80fbe97a0 1 parent bec710f
@Divran Divran authored
View
7 lua/entities/gmod_wire_thruster/init.lua
@@ -118,6 +118,13 @@ function ENT:Setup(force, force_min, force_max, oweffect, uweffect, owater, uwat
self.UWater = uwater
if (!soundname) then soundname = "" end
+
+ -- Preventing client crashes
+ local BlockedChars = '["?]'
+ if ( string.find(soundname, BlockedChars) ) then
+ self:StopSound( self.SoundName )
+ soundname = ""
+ end
if (soundname == "") then
self:StopSound( self.SoundName )
View
8 lua/entities/gmod_wire_turret/init.lua
@@ -71,7 +71,13 @@ end
-- Sound
function ENT:SetSound( str )
- self.Sound = str
+ -- Preventing client crashes
+ local BlockedChars = '["?]'
+ if ( string.find(str, BlockedChars) ) then
+ self.Sound = ""
+ else
+ self.Sound = str
+ end
end
function ENT:GetSound()
return self.Sound
View
7 lua/entities/gmod_wire_vectorthruster/init.lua
@@ -127,6 +127,13 @@ function ENT:Setup(force, force_min, force_max, oweffect, uweffect, owater, uwat
self.BiDir = bidir
self.OWater = owater
self.UWater = uwater
+
+ -- Preventing client crashes
+ local BlockedChars = '["?]'
+ if ( string.find(soundname, BlockedChars) ) then
+ self:StopSound( self.SoundName )
+ soundname = ""
+ end
if (soundname and soundname == "" and self.SoundName and self.SoundName != "") then
self:StopSound(self.SoundName)
Please sign in to comment.
Something went wrong with that request. Please try again.