lynx

Advanced lynx | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Поступило предложение из темы [rl=http://forum.ru-board.com/topic.cgi?forum=21&topic=0926&start=40#9] Баг с Яваскриптом (javascript) во всех версиях IkonBoard[/url]: Цитата: ICQ и AOL, AIM Может их вообще вырезать, да и проблем меньше будет... ? | Реализовываем. Пример приводится на стандартной IB2 из архива: Обзор форума IkonBoard V. 2 (карта форума) » Файловый архив II » IB219rus_fixed3.zip 1. Открываем Код:. Добавляем строки, помеченные красным (этим мы закомментируем строки), либо удаляем нижеприведенные куски кода. Кусок 1. Код: =begin ### ICQ stuff elsif ($action eq "icq") { $UIN=&cleaninput($UIN); $output = qq~ <html><head><title>$ibtxt{'1205'} $boardname</title></head> <body topmargin=10 leftmargin=0> <table width=95% cellpadding=0 cellspacing=1 border=0 align=center bgcolor=$tablebordercolor> <tr> <td> <form action="http://wwp.mirabilis.com/scripts/WWPMsg.dll" method="post"> <input type="hidden" name="subject" value="From $boardname"><input type="hidden" name="to" value="$UIN"> <table width=100% cellpadding=5 cellspacing=1 border=0> <tr> <td bgcolor="$titlecolor" align=center valign=middle colspan=2> <font face="$font" color="$titlefontcolor" size=$dfontsize2><b>$boardname - $ibtxt{'1207'}</b><br>$ibtxt{'1206'} $UIN</font> </td> </tr> <tr> <td bgcolor="$miscbacktwo" align=left valign=top> <font face="$font" color="$fontcolormisc" size=$dfontsize2>$ibtxt{'0922'}</font> </td> <td bgcolor="$miscbacktwo" align=left valign=middle> <input type="text" name="from" size="20" maxlength="40"> </td> </tr> <tr> <td bgcolor="$miscbackone" align=left valign=top> <font face="$font" color="$fontcolormisc" size=$dfontsize2>$ibtxt{'1209'}</font> </td> <td bgcolor="$miscbackone" align=left valign=middle> <input type="text" name="fromemail" size="20" maxlength="40"> </td> </tr> <tr> <td bgcolor="$miscbackone" align=left valign=top> <font face="$font" color="$fontcolormisc" size=$dfontsize2>$ibtxt{'1210'}</font> </td> <td bgcolor="$miscbackone" align=left valign=middle> <textarea name="body" rows="3" cols="30" wrap="Virtual"></textarea> </td> </tr> <tr> <td bgcolor="$miscbacktwo" align=center valign=middle colspan=2> <input type="submit" name="Send" value="$ibtxt{'1211'}"></form> </td> </tr> </table> </td></tr> </table> </body> </html> ~; } # end elsif icq =cut | Кусок 2. Код: =begin elsif ($action eq "aim") { $aimname=&cleaninput($aimname); #пофиксили уязвимость $cleanboardname = $boardname; $cleanboardname =~ s/ /\+/sg; $output = qq~ <html><head><title>$ibtxt{'1225'} $boardname</title></head> <body topmargin=10 leftmargin=0> <table width=95% cellpadding=0 cellspacing=1 border=0 align=center bgcolor=$tablebordercolor> <tr> <td> <table width=100% cellpadding=6 cellspacing=1 border=0> <tr> <td bgcolor="$titlecolor" align=center valign=middle> <font face="$font" color="$titlefontcolor" size=$dfontsize2><b>$boardname - $ibtxt{'1226'}</b></font> </td> </tr> <tr> <td bgcolor="$miscbacktwo" align=center valign=middle> <font face="$font" color="$fontcolormisc" size=$dfontsize2> <a href="aim:goim?screenname=$aimname&message=$ibtxt{'1231'}+$ibtxt{'1232'}+$ibtxt{'0934'}+$cleanboardname">$ibtxt{'1227'} $aimname $ibtxt{'1228'}</a></font> </tr> <tr> <td bgcolor="$miscbackone" align=center valign=middle> <font face="$font" color="$fontcolormisc" size=$dfontsize2> <a href="aim:addbuddy?screenname=$aimname">$ibtxt{'1229'} $aimname $ibtxt{'1230'}</a></font> </td> </tr> </table> </td></tr> </table> </body> </html> ~; } # end aim =cut | В том же скрипте misc.cgi в самом начале комментируем строки: Код: $UIN = $query -> param('UIN'); #эту $action = $query -> param('action'); $aimname = $query -> param('aimname'); #эту $aimname =~ s/ //g; #и эту | то есть пишем так: Код: #$UIN = $query -> param('UIN'); $action = $query -> param('action'); #$aimname = $query -> param('aimname'); #$aimname =~ s/ //g; | или удаляем их. 2. Открываем topic.cgi Удаляем или комментируем следующий код: Код: if ($aolname) { if ($text_menu ne "yes"){ $aolgraphic = qq~<a href="javascript:openScript('$miscprog?action=aim&aimname=$aolname',450,200)"><img src="$imagesurl/images/$aol" border=0></a>~; } else { $aolgraphic = qq~ | <a href="javascript:openScript('$miscprog?action=aim&aimname=$aolname',450,200)">AOL</a>~; } } else { undef $aolgraphic; } if (($icqnumber) && ($icqnumber =~ /[0-9]/)) { if ($text_menu ne "yes"){ $icqgraphic = qq~<a href="javascript:openScript('$miscprog?action=icq&UIN=$icqnumber',450,300)"><img src="http://wwp.icq.com/scripts/online.dll?icq=$icqnumber&img=5" border=0><img src="$imagesurl/images/$icq" border=0></a>~; } else { $icqgraphic = qq~ | <a href="javascript:openScript('$miscprog?action=icq&UIN=$icqnumber',450,300)">ICQ</a>~; } } else { undef $icqgraphic; } | Этим мы убрали обработку icq и aol, кторые мы вырезали из misc.cgi. Удаляем то, что выделено красным: Код: <td bgcolor="$postbackcolor" valign=top width=80% height=100%><font face="$font" color=$postfontcolor size=$dfontsize1> $editgraphic $partition $profilegraphic $homepagegraphic $emailgraphic $privatemessagegraphic $aolgraphic $icqgraphic $partition $replygraphic </font> | Этим мы убрали вывод icq и aol. На этом все. Перед редактированием скриптов делайте их резервные копии. |