ahmetkucukonder adlı üyeden alıntı: mesajı görüntüle
Evet bu bir açık, veriyi direkt sorguya atamayın önce sanitize(sterilize) edin, mysqli mi kullanıyorsunuz?
santize olayı nasıl yapılır ? kodum aşağıdaki gibi, mysqli değil mysql kullanıyorum hocam. Teşekkürler

Kodum :

<?php
try {
    $baglanti = new PDO("mysql:host=localhost;dbname=SANSÜR", "SANSÜR", "SANSÜR");
    $baglanti->exec("SET NAMES utf8");
    $baglanti->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $sorgu = $baglanti->query("SELECT * FROM wo_users WHERE username = '".htmlspecialchars($_GET["username"])."'");
    $cikti = $sorgu->fetch(PDO::FETCH_ASSOC);
    if($cikti == null){
        $cikti['avatar'] = "upload/photos/meetweb-circle.png";
        
    }
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://SANSÜR/".$cikti['avatar']);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4389.208 Safari/537.36");
    $resim = curl_exec($ch);
    curl_close($ch);
    header("Content-Type: image/png");
    echo $resim;
    exit;
} catch (PDOException $e) {
    die($e->getMessage());
}
$baglanti = null;
?>