Escaping Audio URLs - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Escaping Audio URLs (
/showthread.php?tid=600828)
Escaping Audio URLs -
BigBrainAFK - 13.02.2016
Hey,
I wanted to make Audiostreams playable from an UCP so Players can load completely own Radios etc dynamicly into SAMP.
The Problem is that the function, PlayAudioStreamForPlayer(playerid, url[], Float

osX, Float

osY, Float

osZ , Float:distance, usepos), uses a string as URL and thus I'm not sure how I manage it so Players can't inject their own code with this feature.
Atm I'm thinking that an Audio-URL with a "; at the end could lead to Script errors or even custom written code that gets injected.
The question is can I somehow excape the URL or do i have to make the checks in the PHP script?
Re: Escaping Audio URLs -
TheEightball - 13.02.2016
I believe the URL input is already escaped in SA-MP's code. If it wasn't then there would be many reported crashes and errors regarding the function. So additional escaping and filtering is unnecessary.