exit; } $package_name = $buginfo['package_name']; $handle = $patchinfo->getDeveloper($bug_id, $patch_name, $revision); $obsoletedby = $patchinfo->getObsoletingPatches($bug_id, $patch_name, $revision); $obsoletes = $patchinfo->getObsoletePatches($bug_id, $patch_name, $revision); $patches = $patchinfo->listPatches($bug_id); $revisions = $patchinfo->listRevisions($bug_id, $patch_name); response_header("Bug #{$bug_id} :: Patches"); include "{$ROOT_DIR}/templates/listpatches.php"; if (isset($_GET['diff']) && $_GET['diff'] && isset($_GET['old']) && is_numeric($_GET['old'])) { $old = $patchinfo->getPatchFullpath($bug_id, $patch_name, $_GET['old']); $new = $path; if (!realpath($old) || !realpath($new)) { response_header('Error :: Cannot retrieve patch'); display_bug_error('Internal error: Invalid patch revision specified for diff'); response_footer(); exit; } require_once "{$ROOT_DIR}/include/classes/bug_diff_renderer.php"; assert_options(ASSERT_WARNING, 0); $d = new Text_Diff($orig = file($old), $now = file($new)); $diff = new Bug_Diff_Renderer($d); include "{$ROOT_DIR}/templates/patchdiff.php"; response_footer(); exit; } include "{$ROOT_DIR}/templates/patchdisplay.php"; response_footer(); exit; }
</p> <p>Report <img src="images/pear_item.gif"><b>PEAR</b> related bugs <a href="http://pear.php.net/bugs/">here</a></p> <p> <strong>If you feel this bug concerns a security issue, e.g. a buffer overflow, weak encryption, etc, then email <?php echo make_mailto_link("{$site_data['security_email']}?subject=%5BSECURITY%5D+possible+new+bug%21", $site_data['security_email']); ?> who will assess the situation or use <strong>Security</strong> as bug type in the form below.</strong> </p> <?php } display_bug_error($errors); ?> <form method="post" action="report.php?package=<?php echo htmlspecialchars($package); ?> " name="bugreport" id="bugreport" enctype="multipart/form-data"> <input type="hidden" name="in[did_luser_search]" value="<?php echo isset($_POST['in']['did_luser_search']) ? $_POST['in']['did_luser_search'] : 0; ?> "> <table class="form-holder" cellspacing="1"> <?php if ($logged_in) { ?> <tr> <th class="form-label_left">Your handle:</th>
// Standard items $in = array('status' => $status, 'bug_type' => $bug['bug_type'], 'php_version' => $bug['php_version'], 'php_os' => $bug['php_os'], 'assign' => $bug['assign']); // Assign automatically when closed if ($status == 'Closed' && $in['assign'] == '') { $in['assign'] = $auth_user->handle; } // Update bug $dbh->prepare("\n\tUPDATE bugdb\n\tSET\n\t\tstatus = ?,\n\t\tassign = ?,\n\t\tts2 = NOW()\n\tWHERE id = ?\n")->execute(array($status, $in['assign'], $bug_id)); // Add changelog entry if (!PEAR::isError($res)) { $changed = bug_diff($bug, $in); if (!empty($changed)) { $log_comment = bug_diff_render_html($changed); if (!empty($log_comment)) { $res = bugs_add_comment($bug_id, $auth_user->email, $auth_user->name, $log_comment, 'log'); } } } // Add possible comment if (!PEAR::isError($res) && !empty($ncomment)) { $res = bugs_add_comment($bug_id, $auth_user->email, $auth_user->name, $ncomment, 'comment'); } // Send emails if (!PEAR::isError($res)) { mail_bug_updates($bug, $in, $auth_user->email, $ncomment); redirect("bug.php?id={$bug_id}&thanks=1"); } // If we end up here, something went wrong. response_header('Resolve Bug: Problem'); display_bug_error($res); response_footer();
response_footer(); exit; } $package_name = $buginfo['package_name']; // Authenticate bugs_authenticate($user, $pw, $logged_in, $user_flags); $is_trusted_developer = $user_flags & BUGS_TRUSTED_DEV; // captcha is not necessary if the user is logged in if (!$logged_in) { require_once 'Text/CAPTCHA/Numeral.php'; $numeralCaptcha = new Text_CAPTCHA_Numeral(); } $show_bug_info = bugs_has_access($bug_id, $buginfo, $pw, $user_flags); if (!$show_bug_info) { response_header('Private report'); display_bug_error("The bug #{$bug_id} is not available to public"); response_footer(); exit; } require_once "{$ROOT_DIR}/include/classes/bug_patchtracker.php"; $patchinfo = new Bug_Patchtracker(); $patch_name = !empty($_GET['patchname']) && is_string($_GET['patchname']) ? $_GET['patchname'] : ''; $patch_name = !empty($_POST['name']) && is_string($_POST['name']) ? $_POST['name'] : $patch_name; $patch_name_url = urlencode($patch_name); if (isset($_POST['addpatch'])) { if (!isset($_POST['obsoleted'])) { $_POST['obsoleted'] = array(); } // Check that patch name is given (required always) if (empty($patch_name)) { $patches = $patchinfo->listPatches($bug_id);
if (!isset($_POST['score'])) { die("missing parameter score"); } $score = (int) $_POST['score']; if ($score < -2 || $score > 2) { die("invalid score: {$score}"); } if (!isset($_POST['reproduced'])) { die("missing parameter reproduced"); } $reproduced = (int) $_POST['reproduced']; $samever = isset($_POST['samever']) ? (int) $_POST['samever'] : 0; $sameos = isset($_POST['sameos']) ? (int) $_POST['sameos'] : 0; if (!$dbh->prepare("SELECT id FROM bugdb WHERE id= ? LIMIT 1")->execute(array($id))->fetchOne()) { response_header('No such bug.'); display_bug_error("No such bug #{$id}"); response_footer(); exit; } // Figure out which IP the user is coming from avoiding RFC 1918 space function get_real_ip() { $ip = false; // User is behind a proxy and check that we discard RFC1918 IP // addresses if they are behind a proxy then only figure out which // IP belongs to the user. Might not need any more hacking if // there is a squid reverse proxy infront of apache. if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ips = explode(", ", $_SERVER['HTTP_X_FORWARDED_FOR']); if ($ip) { array_unshift($ips, $ip);
echo ' <td>', $row['php_os'] ? htmlspecialchars($row['php_os']) : ' ', '</td>', "\n"; // Short description echo ' <td><a href="bug.php?id=', $row['id'], '">', $row['sdesc'] ? htmlspecialchars($row['sdesc']) : ' ', '</a></td>', "\n"; // Assigned to echo ' <td>', $row['assign'] ? "<a href=\"{$clean_link}&assign=" . urlencode($row['assign']) . '">' . htmlspecialchars($row['assign']) . '</a>' : ' ', '</td>'; echo " </tr>\n"; } show_prev_next($begin, $rows, $total_rows, $link, $limit); echo "</table>\n\n"; } response_footer(); exit; } } display_bug_error($errors); display_bug_error($warnings, 'warnings', 'WARNING:'); ?> <form id="asearch" method="get" action="search.php"> <table id="primary" width="100%"> <tr valign="top"> <th>Find bugs</th> <td style="white-space: nowrap">with all or any of the w<span class="accesskey">o</span>rds</td> <td style="white-space: nowrap"><input type="text" name="search_for" value="<?php echo htmlspecialchars($search_for, ENT_COMPAT, 'UTF-8'); ?> " size="20" maxlength="255" accesskey="o" /><br /> <small> <?php show_boolean_options($boolean_search); ?> (<a href="search-howto.php" target="_new">?</a>)