cvs: pres2 / index.php

From: Date: Mon, 04 Jul 2005 01:28:04 +0000
Subject: cvs: pres2 / index.php
Groups: php.pres 
Request: Send a blank email to pres+get-1158@lists.php.net to get a copy of this message
rasmus Sun Jul 3 21:28:04 2005 EDT Modified files: /pres2 index.php Log: Fix an XSS http://cvs.php.net/diff.php/pres2/index.php?r1=1.41&r2=1.42&ty=u Index: pres2/index.php diff -u pres2/index.php:1.41 pres2/index.php:1.42 --- pres2/index.php:1.41 Tue May 24 18:38:33 2005 +++ pres2/index.php Sun Jul 3 21:28:03 2005 @@ -143,7 +143,7 @@ $_SESSION['show_speaker_notes'] = ($form_speaker=='true'); $_SESSION['selected_display_mode'] = $display_mode; ?> -<form name="modes_form" action="<?php echo $_SERVER['PHP_SELF']?>" method="POST"> +<form name="modes_form" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'])?>" method="POST"> <p><?php echo message('SELECT_MODE'); ?> <select name="modes" onChange="change_mode()"> <option value="html" <?php echo ($display_mode=='html')?'SELECTED':''?>><?php echo message('OPT_FANCYHTML'); ?></option> @@ -193,6 +193,7 @@ function cmp($a,$b) { return strtotime($a['date']) < strtotime($b['date']); +return 1; } usort($pr,'cmp');

« previous php.pres (#1158) next »