cvs: php-gcov-web /www compile_results.php params.php site.api.php skip.php tests.php valgrind.php

From: Date: Fri, 29 Dec 2006 20:18:44 +0000
Subject: cvs: php-gcov-web /www compile_results.php params.php site.api.php skip.php tests.php valgrind.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-33626@lists.php.net to get a copy of this message
nlopess Fri Dec 29 20:18:44 2006 UTC Modified files: /php-gcov-web/www compile_results.php params.php site.api.php skip.php tests.php valgrind.php Log: add htmlspecialchars() everywhere, in addvance to remote build support add the lxr message only when not in PHP_HEAD http://cvs.php.net/viewvc.cgi/php-gcov-web/www/compile_results.php?r1=1.3&r2=1.4&diff_format=u Index: php-gcov-web/www/compile_results.php diff -u php-gcov-web/www/compile_results.php:1.3 php-gcov-web/www/compile_results.php:1.4 --- php-gcov-web/www/compile_results.php:1.3 Sat Dec 23 13:10:48 2006 +++ php-gcov-web/www/compile_results.php Fri Dec 29 20:18:44 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: compile_results.php,v 1.3 2006/12/23 13:10:48 nlopess Exp $ */ +/* $Id: compile_results.php,v 1.4 2006/12/29 20:18:44 nlopess Exp $ */ if (!defined('IN_GCOV_CODE')) exit; @@ -38,6 +38,7 @@ HTML; foreach ($data as $path => $fileentry) { + $path = htmlspecialchars($path); $content .= <<< HTML <tr> @@ -51,9 +52,9 @@ HTML; foreach ($fileentry as $entry) { - $function = $entry[0]; - $line = $entry[1]; - $type = $entry[2]; + $function = htmlspecialchars($entry[0]); + $line = htmlspecialchars($entry[1]); + $type = htmlspecialchars($entry[2]); $msg = htmlspecialchars($entry[3]); $lxrlink = make_lxr_link($path, $line); $cvslink = make_cvs_link($path, $line); @@ -81,8 +82,8 @@ $content </table> -<p><strong>Note</strong>: the lxr links are made against the HEAD branch, and thus the line numbers may be incorrect.</p> HTML; + $content .= lxr_broken_links_note(); } else { $content = "<p>Congratulations! Currently there are no compiler warnings/errors!</p>\n"; http://cvs.php.net/viewvc.cgi/php-gcov-web/www/params.php?r1=1.2&r2=1.3&diff_format=u Index: php-gcov-web/www/params.php diff -u php-gcov-web/www/params.php:1.2 php-gcov-web/www/params.php:1.3 --- php-gcov-web/www/params.php:1.2 Fri Dec 22 23:06:29 2006 +++ php-gcov-web/www/params.php Fri Dec 29 20:18:44 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: params.php,v 1.2 2006/12/22 23:06:29 nlopess Exp $ */ +/* $Id: params.php,v 1.3 2006/12/29 20:18:44 nlopess Exp $ */ if (!defined('IN_GCOV_CODE')) exit; @@ -37,6 +37,7 @@ HTML; foreach ($data as $path => $fileentry) { + $path = htmlspecialchars($path); $content .= <<< HTML <tr> @@ -50,8 +51,8 @@ HTML; foreach ($fileentry as $entry) { - $line = $entry[0]; - $function = $entry[1]; + $line = htmlspecialchars($entry[0]); + $function = htmlspecialchars($entry[1]); $msg = htmlspecialchars($entry[2]); $lxrlink = make_lxr_link($path, $line); $cvslink = make_cvs_link($path, $line); @@ -74,8 +75,8 @@ $content </table> -<p><strong>Note</strong>: the lxr links are made against the HEAD branch, and thus the line numbers may be incorrect.</p> HTML; + $content .= lxr_broken_links_note(); } else { $content = "<p>Congratulations! Currently there are no compiler warnings/errors!</p>\n"; http://cvs.php.net/viewvc.cgi/php-gcov-web/www/site.api.php?r1=1.6&r2=1.7&diff_format=u Index: php-gcov-web/www/site.api.php diff -u php-gcov-web/www/site.api.php:1.6 php-gcov-web/www/site.api.php:1.7 --- php-gcov-web/www/site.api.php:1.6 Fri Dec 22 23:16:30 2006 +++ php-gcov-web/www/site.api.php Fri Dec 29 20:18:44 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: site.api.php,v 1.6 2006/12/22 23:16:30 nlopess Exp $ */ +/* $Id: site.api.php,v 1.7 2006/12/29 20:18:44 nlopess Exp $ */ // File: Core Site API File // Desc: contains core display functions, it is essential for all pages to include this file. @@ -320,3 +320,10 @@ return "<a href=\"http://lxr.php.net/ident?i=$func\">$func</a>"; } } + + +function lxr_broken_links_note() +{ + if ($GLOBALS['version'] !== 'PHP_HEAD') + return '<p><strong>Note</strong>: the lxr links are made against the HEAD branch, and thus the line numbers may be incorrect.</p>'; +} http://cvs.php.net/viewvc.cgi/php-gcov-web/www/skip.php?r1=1.2&r2=1.3&diff_format=u Index: php-gcov-web/www/skip.php diff -u php-gcov-web/www/skip.php:1.2 php-gcov-web/www/skip.php:1.3 --- php-gcov-web/www/skip.php:1.2 Thu Dec 21 23:19:03 2006 +++ php-gcov-web/www/skip.php Fri Dec 29 20:18:44 2006 @@ -17,14 +17,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: skip.php,v 1.2 2006/12/21 23:19:03 nlopess Exp $ */ +/* $Id: skip.php,v 1.3 2006/12/29 20:18:44 nlopess Exp $ */ if (!defined('IN_GCOV_CODE')) exit; $inputfile = "./$version/skip.inc"; $raw_data = @file_get_contents($inputfile); $data = unserialize($raw_data); -$old_dir = ''; if (!$raw_data) { @@ -56,14 +55,15 @@ } elseif ($data) { $content = '<p><b>'.count($data) . " tests were skipped:</b></p>\n"; + $old_dir = ''; $content .= <<< HTML <table border="1"> HTML; foreach ($data as $path => $entry) { - $dir = dirname($path); - $file = basename($path); + $dir = htmlspecialchars(dirname($path)); + $file = htmlspecialchars(basename($path)); $urlfile = htmlspecialchars(urlencode($path)); $reason = htmlspecialchars($entry[1] ? $entry[1] : '(no reason given)'); http://cvs.php.net/viewvc.cgi/php-gcov-web/www/tests.php?r1=1.2&r2=1.3&diff_format=u Index: php-gcov-web/www/tests.php diff -u php-gcov-web/www/tests.php:1.2 php-gcov-web/www/tests.php:1.3 --- php-gcov-web/www/tests.php:1.2 Thu Dec 21 23:19:03 2006 +++ php-gcov-web/www/tests.php Fri Dec 29 20:18:44 2006 @@ -17,14 +17,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: tests.php,v 1.2 2006/12/21 23:19:03 nlopess Exp $ */ +/* $Id: tests.php,v 1.3 2006/12/29 20:18:44 nlopess Exp $ */ if (!defined('IN_GCOV_CODE')) exit; $inputfile = "./$version/fail.inc"; $raw_data = @file_get_contents($inputfile); $data = unserialize($raw_data); -$old_dir = ''; if (!$raw_data) { @@ -62,16 +61,17 @@ } elseif ($data) { $content = '<p><b>'.count($data) . " tests failed:</b></p>\n"; + $old_dir = ''; $content .= <<< HTML <table border="1"> HTML; foreach ($data as $path => $entry) { - $dir = dirname($path); - $file = basename($path); + $dir = htmlspecialchars(dirname($path)); + $file = htmlspecialchars(basename($path)); $urlfile = htmlspecialchars(urlencode($path)); - $type = $entry[0]; + $type = htmlspecialchars($entry[0]); $title = htmlspecialchars($entry[1]); if ($dir !== $old_dir) { http://cvs.php.net/viewvc.cgi/php-gcov-web/www/valgrind.php?r1=1.1&r2=1.2&diff_format=u Index: php-gcov-web/www/valgrind.php diff -u php-gcov-web/www/valgrind.php:1.1 php-gcov-web/www/valgrind.php:1.2 --- php-gcov-web/www/valgrind.php:1.1 Thu Dec 21 23:19:03 2006 +++ php-gcov-web/www/valgrind.php Fri Dec 29 20:18:44 2006 @@ -17,14 +17,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: valgrind.php,v 1.1 2006/12/21 23:19:03 nlopess Exp $ */ +/* $Id: valgrind.php,v 1.2 2006/12/29 20:18:44 nlopess Exp $ */ if (!defined('IN_GCOV_CODE')) exit; $inputfile = "./$version/valgrind.inc"; $raw_data = @file_get_contents($inputfile); $data = unserialize($raw_data); -$old_dir = ''; if (!$raw_data) { @@ -56,17 +55,18 @@ } elseif ($data) { $content = '<p><b>'.count($data) . " valgrind reports:</b></p>\n"; + $old_dir = ''; $content .= <<< HTML <table border="1"> HTML; foreach ($data as $path => $entry) { - $dir = dirname($path); - $file = basename($path); + $dir = htmlspecialchars(dirname($path)); + $file = htmlspecialchars(basename($path)); $urlfile = htmlspecialchars(urlencode($path)); $title = htmlspecialchars($entry[0]); - $type = $entry[1]; + $type = htmlspecialchars($entry[1]); if ($dir !== $old_dir) { $old_dir = $dir;

« previous php.mirrors (#33626) next »