Author Topic: [1.7 - 1.7.10] Security fix for XSS issue in details.php  (Read 31608 times)

0 Members and 1 Guest are viewing this topic.

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.418
    • View Profile
    • 4images - Image Gallery Management System
[1.7 - 1.7.10] Security fix for XSS issue in details.php
« on: March 19, 2012, 05:46:51 PM »
A cross site scripting vulnerability in 4images 1.7 - 1.7.10 has been found.

To fix this:

In details.php

find

$meta_keywords  = !empty($image_row['image_keywords']) ? implode(", "explode(","$image_row['image_keywords'])) : "";
$meta_description = !empty($image_row['image_description']) ? strip_tags($image_row['image_description']) . ". " "";


and replace it with

$meta_keywords  = !empty($image_row['image_keywords']) ? strip_tags(implode(", "explode(","$image_row['image_keywords']))) : "";
$meta_description = !empty($image_row['image_description']) ? strip_tags($image_row['image_description']) . ". " "";



and in rss.php

find 2 x

$text format_text(trim($text), 101);

and replace it both times with

$text format_text(trim($text), 201);
« Last Edit: March 20, 2012, 02:51:52 PM by kai »
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.288
    • View Profile
    • Discover the New World of Kindersurprise
Re: [1.7 - 1.7.10] Security fix for XSS issue in details.php
« Reply #1 on: March 19, 2012, 05:59:51 PM »
bei mir wurde die functions.php mal verändert, kann nicht mehr sagen von welchem Mod.

wie muss ich vorgehen ?

//$description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 1, 0, 1) : REPLACE_EMPTY;
  
$description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 1) : REPLACE_EMPTY;


LG

Der Eintrag in der rss.php ist 2x vorhanden, auch 2x ersetzen ?
Danke Harald




Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.804
  • I ♥ 4I
    • View Profile
Re: [1.7 - 1.7.10] Security fix for XSS issue in details.php
« Reply #2 on: March 19, 2012, 06:31:24 PM »
@ Jan,

ich denke mal du kannst das einfach so übernehmen:
$description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 201) : REPLACE_EMPTY;

Und ja rss.php 2x suchen und 2x ersetzen

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.288
    • View Profile
    • Discover the New World of Kindersurprise
Re: [1.7 - 1.7.10] Security fix for XSS issue in details.php
« Reply #3 on: March 19, 2012, 06:59:23 PM »
schon, nur hatte ich das ja nicht grundlos geändert  :wink:
habe es jetzt so geändert

$description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 2) : REPLACE_EMPTY;

glaube das lag an der html Geschichte in der Beschreibung

LG
Danke Harald




Offline jkn

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [1.7 - 1.7.10] Security fix for XSS issue in details.php
« Reply #4 on: May 21, 2012, 09:34:12 AM »
hallo,
in meiner mehr oder weniger originalen version 1.7 gibts weder in der details.php, noch in der rss.php die beiden oben genannten code-zeilen! betrifft die lücke evtl. nur spätere versionen!??

Rembrandt

  • Guest
Re: [1.7 - 1.7.10] Security fix for XSS issue in details.php
« Reply #5 on: May 21, 2012, 12:32:14 PM »
Hi!

...in meiner mehr oder weniger originalen version 1.7 gibts weder in der details.php, noch in der rss.php die beiden oben genannten code-zeilen! betrifft die lücke evtl. nur spätere versionen!??
Wenn du wirklich noch ein 1.7er Version hast dann ja, die Meta Keyword und Description sind viel später dazu gekommen.
Die werden dazu benötigt um die Keyw. und die desc. in den Page Header zu bekommen, quasi um das ganze Suchmaschinen freundlicher zu gestalten.

mfg Andi