Copperine genel açık
AÇ: displayimage.php
BUL:
if (isset($exif) && is_array($exif)) {
Değiştir:
if (isset($exif) && is_array($exif)) {
//Sanitize the data - to fix the XSS vulnerability - Aditya
foreach ($exif as $key=>$data) {
$exif[$key] = htmlentities(strip_tags(trim($data,"\x7f..\xff\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim any nongraphical non-ASCII character:
}
BUL:
if (isset($iptc) && is_array($iptc)) {
if (isset($iptc['Title'])) $info[$lang_picinfo['iptcTitle']] = trim($iptc['Title']);
if (isset($iptc['Copyright'])) $info[$lang_picinfo['iptcCopyright']] = trim($iptc['Copyright']);
if (!empty($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = trim(implode(" ",$iptc['Keywords']));
if (isset($iptc['Category'])) $info[$lang_picinfo['iptcCategory']] = trim($iptc['Category']);
if (!empty($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));
}
Değiştir:
if (isset($iptc) && is_array($iptc)) {
if (isset($iptc['Title'])) $info[$lang_picinfo['iptcTitle']] = trim($iptc['Title']);
if (isset($iptc['Copyright'])) $info[$lang_picinfo['iptcCopyright']] = trim($iptc['Copyright']);
if (!empty($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = trim(implode(" ",$iptc['Keywords']));
if (isset($iptc['Category'])) $info[$lang_picinfo['iptcCategory']] = trim($iptc['Category']);
if (!empty($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));
}
Coppermine Galeriniz cpg1.3.4 versiyonunun altında ise bu açık sizin sitenizde de vardır , bunu çözmek için galerinizi cpg1.3.4 versiyonuna yükseltin veya aşağıdaki adımları izleyin .
2) Daha düşük bir versiyon kullanıyorsanız displayimage.php dosyası içinde aşağıdaki kodları bulun ve değiştirin =
Bu Kodu Bulun:
Kod:
if (isset($exif) && is_array($exif)) {
Yerine Aşağıdaki Kodu Yazın:
Kod:
if (isset($exif) && is_array($exif)) {
//Sanitize the data - to fix the XSS vulnerability - Aditya
foreach ($exif as $key=>$data) {
$exif[$key] = htmlentities(strip_tags(trim($data,"\x7f..\xff\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim any nongraphical non-ASCII character:
}
Bu Kodu Bulun:
Kod:
if (isset($iptc) && is_array($iptc)) {
if (isset($iptc['Title'])) $info[$lang_picinfo['iptcTitle']] = trim($iptc['Title']);
if (isset($iptc['Copyright'])) $info[$lang_picinfo['iptcCopyright']] = trim($iptc['Copyright']);
if (!empty($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = trim(implode(" ",$iptc['Keywords']));
if (isset($iptc['Category'])) $info[$lang_picinfo['iptcCategory']] = trim($iptc['Category']);
if (!empty($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));
}
Yerine Aşağıdaki Kodu Yazın:
Kod:
if (isset($iptc) && is_array($iptc)) {
//Sanitize the data - to fix the XSS vulnerability - Aditya
foreach ($iptc as $key=>$data) {
$iptc[$key] = htmlentities(strip_tags(trim($data,"\x7f..\xff\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim any nongraphical non-ASCII character:
}
if (isset($iptc['Title'])) $info[$lang_picinfo['iptcTitle']] = trim($iptc['Title']);
if (isset($iptc['Copyright'])) $info[$lang_picinfo['iptcCopyright']] = trim($iptc['Copyright']);
if (!empty($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = trim(implode(" ",$iptc['Keywords']));
if (isset($iptc['Category'])) $info[$lang_picinfo['iptcCategory']] = trim($iptc['Category']);
if (!empty($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));
}
Code:
if (is_array($HTTP_GET_VARS)) {
foreach ($HTTP_GET_VARS as $key => $value) {
$HTTP_GET_VARS[$key] = strtr(stripslashes($value), $HTML_SUBST);
if (isset($$key)) unset($$key);
}
}
with
Code:
if (is_array($HTTP_GET_VARS)) {
foreach ($HTTP_GET_VARS as $key => $value) {
unset($HTTP_GET_VARS[$key]);
$HTTP_GET_VARS[strtr(stripslashes($key), $HTML_SUBST)] = strtr(stripslashes($value), $HTML_SUBST);
if (isset($$key)) unset($$key);
}
}
Add
Code:
/**
* Sanitize $_GET also, as we have used it in many places
*/
if (is_array($_GET)) {
foreach ($_GET as $key => $value) {
unset($_GET[$key]);
$_GET[strtr(stripslashes($key), $HTML_SUBST)] = strtr(stripslashes($value), $HTML_SUBST);
if (isset($$key)) unset($$key);
}
}
after
Code:
if (is_array($HTTP_GET_VARS)) {
foreach ($HTTP_GET_VARS as $key => $value) {
unset($HTTP_GET_VARS[$key]);
$HTTP_GET_VARS[strtr(stripslashes($key), $HTML_SUBST)] = strtr(stripslashes($value), $HTML_SUBST);
if (isset($$key)) unset($$key);
}
}
usta eline sağlik ama cpgnuke1.3.1a kualniyorum verdiğin kodalri ekeldim siteye ama gele gelelim resim yukelmeye resim yukluyorum beyaz sayafa çikiyo anasayfaya dönuyorum resim yukelnmiş tikaldiğim anda benbeyaz sayfa hata nerde acaba
En son Diyar36 tarafından 2006-03-26, 03:58:28 tarihinde değiştirildi, toplam 1 kere değiştirildi
Kayıt: Jul 20, 2002 Mesajlar: 3836 Konum: Balıkesir
Tarih: 2006-03-26, 04:11:24 Mesaj konusu:
Ben yapılan değişiklikleri inceledim ama kodlarda hata yok. Boş sayfa çıkmasının nedeni hata mesajlarının artık engellenmesidir. Bu tür durumlarda config.php dosyanızdan $display_errors=false; yazan yerdeki false yerine true yazabilirsiniz. Böylece hata mesajları gösterilecektir. Ona göre hatayı bulmaya çalışırız.
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız