|
Kaan
678 posts |
#621 2014-05-08 20:24 GMT | |
|
Bildiğiniz gibi Seditio'ya Otomatik yönlendirme eklemiştik fakat bunda fark ettik ki SQL açığı veriyor.
Gerekli güncellemeyi aşağıdaki şekilde yapabilirsiniz. System/common.php yi açın altt Kod: bulun. } [code]if (($cfg['rd_option'] == "Login Redirect his place")&&($usr['id'] < 1)) { $rd_loc = $_SERVER["PHP_SELF"]; $rd_extra = $_SERVER["QUERY_STRING"]; if (!empty($rd_extra)) { $rd_extra = "?".$rd_extra; } $temp = explode("/",$rd_loc); $rd_loc = $temp[count($temp)-1]; if (($rd_loc != "users.php")&&($rd_loc != "message.php")) { $sql_update_online = sed_sql_query("UPDATE $db_redirecter SET rd_location='".$rd_loc.$rd_extra."',rd_lastseen='".time()."' WHERE rd_ip='".$_SERVER["REMOTE_ADDR"]."'"); } if (sed_sql_affectedrows() == 0) { // No record, insert $sql_insert_online = sed_sql_query("INSERT INTO $db_redirecter (rd_ip,rd_location,rd_lastseen) VALUES ('".$_SERVER["REMOTE_ADDR"]."','".$rd_loc.$rd_extra."','".time()."')" }[/code] Alttaki ile değiştirin. [code]if (($cfg['rd_option'] == "Giriş yaptıgı yere yönlendir")&&($usr['id'] < 1)) { $rd_loc = $_SERVER["PHP_SELF"]; $rd_extra = $_SERVER["QUERY_STRING"]; if (!empty($rd_extra)) { $rd_extra = "?".$rd_extra; } $temp = explode("/",$rd_loc); $rd_loc = $temp[count($temp)-1]; if ($usr['id']==0){ }else{ if (($rd_loc != "users.php") && ($rd_loc != "message.php")){ $sql_update_online = sed_sql_query("UPDATE sed_redirecter SET rd_location='".$rd_loc.$rd_extra."', rd_lastseen='".time()."' WHERE rd_ip='".$_SERVER["HTTP_CLIENT_IP"]."'"); }} if (sed_sql_affectedrows() == 0){ $sql_insert_online = sed_sql_query("INSERT INTO sed_redirecter (rd_ip, rd_location, rd_lastseen) VALUES ('".$_SERVER["HTTP_CLIENT_IP"]."', '".$rd_loc.$rd_extra."', '".time()."')"); } }[/code] Bu değişiklikden sonra SQL Inj. sorunu ortadan kalkıcaktır.
Kişiliğim, hayatım hakkında konuşabilirsiniz. Fikir yürüte bilirsiniz. Beni öyle böyle sanabilirsiniz. Ama emin olamazsınız. Sizin hakkımdaki yorumlarınız, sanmalarınız benim gerçek de ne olduğumu değiştirmez. Baktığım yeri söyleye bilirsiniz ama ne gördüğümü ASLA...
Bu mesaj Kaan tarafından 2014-05-08 20:34 GMT, 4490 Gün önce düzenlendi. |