PHP Veritabanına Kayıt Edememe
-
Arkadaşlar pastebin benzeri bir script var. Çok basit hali ile not almanızı sağlıyor. Github linki: bastebin https://github.com/Podso/bastebin/blob/master/submit.php şu sayfadaki kodda sorun yaşıyorum. Siteme yükledim. Script düz metin gönderince çalışıyor ama youtube iframe kodunu göndermek istediğim de 403 forbidden hatası veriyor. Sorun tırnak işaretleri veya html kodu yasağı ile ilgili sanırım ama çözemedim. Bir el atarsanız sevinirim.
-
error_log dosyasını açıp hata kodu veren satırı verir misin?
-
Teşekkürler hocam şimdi baktım şöyle bir hata: ModSecurity: Access denied with code 403, [Rule: 'REQUEST_URI|ARGS_POST|ARGS_NAMES|REQUEST_COOKIES|REQUEST_COOKIES_NAMES|XML:/*|!ARGS:/body/|!ARGS:/content/|!ARGS:/description/|!ARGS:Post|!ARGS:desc|!ARGS:html_message|!ARGS:text|!REQUEST_COOKIES:/__utm/|!REQUEST_COOKIES:/_pk_ref/' '@rx <i?frame'] [id "212280"] [rev "4"] [msg "COMODO WAF: Cross-site Scripting (XSS) Attack||-|F|2"] [logdata "Matched Data: <iframe found within <iframewidth="560"height="315"src="https://www.youtube.com/embed/yg0obptynb0"frameborder="0"allow="accelerometer;autoplay;encrypted-media;gyroscope;picture-in-picture"allowfullscreen></iframe>: <iframewidth="560"height="315"src="https://www.youtube.com/embed/yg0obptynb0"frameborder="0"allow="accelerometer;autoplay;encrypted-media;gyroscope;picture-in-picture"allowfullscreen></iframe>"] [severity "CRITICAL"] [tag "CWAF"] [tag "XSS"]
-
$degisken =
addslashes
($degisken);önce bununla girilen veriyi temizletirsin
olmadı birde bununla dene
$degisken = base64_encode($degisken);
muhtemelen birincisi olacıktır.
-
koda bakma imkanim olmadi fakan duz metinde calisip iframe'de calismiyorsa muhtemelen html tagleri problem cikartiyordur.
htmlspecialchars($str); su fonksiyondan gecirip bir daha denemeni oneririm.