} else { /* * We displayed the luser search and they said it really * was not already submitted, so let's allow them to submit. */ $ok_to_submit_report = true; } do { if (!$ok_to_submit_report) { continue; } if (!isset($auth_user)) { $registereduser = 0; // user doesn't exist yet require 'bugs/pear-bug-accountrequest.php'; $buggie = new PEAR_Bug_Accountrequest(); $salt = $buggie->addRequest($_POST['in']['email']); if (is_array($salt)) { $errors = $salt; response_header('Report - Problems'); break; // skip bug addition } if (PEAR::isError($salt)) { $errors[] = $salt; response_header('Report - Problems'); break; } if ($salt === false) { $errors[] = 'Your account cannot be added to the queue.' . ' Please write a mail message to the ' . ' <i>pear-dev</i> mailing list.'; response_header('Report - Problems');
} $email = $request->email; $name = $_POST['name']; $user = $_POST['PEAR_USER']; include PEARWEB_TEMPLATEDIR . '/bugs/registernewaccount.php'; response_footer(); exit; } else { report_error('Unknown account, or account is not pending approval'); } } if (isset($_GET['type']) && $_GET['type'] == 'bug') { echo '<h1>Confirm Bug Tracker Email Address</h1>'; echo '<p>Please choose a username for opening future bugs/adding comments to existing bugs</p>'; if (!empty($stripped['salt']) && strlen($salt = htmlspecialchars($stripped['salt'])) == 32) { $request = new PEAR_Bug_Accountrequest(); if ($request->find($salt) && $request->pending()) { $email = $request->email; $user = $name = ''; $errors = array(); include PEARWEB_TEMPLATEDIR . '/bugs/registernewaccount.php'; response_footer(); exit; } else { report_error('Unknown salt'); } } else { report_error('Unknown salt'); } } else { echo '<h1>Confirm Account</h1>';
<?php if (!isset($_GET['handle'])) { response_header('Error: no handle selected'); report_error('Error: no handle selected for display'); response_footer(); exit; } require 'bugs/pear-bug-accountrequest.php'; $account = new PEAR_Bug_Accountrequest($_GET['handle']); if ($account->pending()) { try { $account->sendEmail(); } catch (Exception $e) { response_header('Error: cannot send confirmation email'); report_error('Error: confirmation email could not be sent: ' . $e->getMessage()); response_footer(); exit; } } else { response_header('Error: handle does not need verification'); report_error('Error: handle is either already verified or does not exist'); response_footer(); exit; } response_header('PEAR :: email re-sent'); ?> <h1>Verification email resent</h1> <p> The verification email has been sent to your email address. </p>
/** * Check if session answer is set, then compare * it with the post captcha value. If it's not * the same, then it's an incorrect password. */ if (isset($_SESSION['answer']) && strlen(trim($_SESSION['answer'])) > 0) { if ($_POST['captcha'] != $_SESSION['answer']) { $errors[] = 'Incorrect Captcha'; } } if (count($errors)) { throw new Exception(''); } // user doesn't exist yet require_once 'bugs/pear-bug-accountrequest.php'; $buggie = new PEAR_Bug_Accountrequest(); $salt = $buggie->addRequest($_POST['email']); if (is_array($salt)) { $errors = $salt; return; } if (PEAR::isError($salt)) { $errors[] = $salt; return; } if ($salt === false) { $errors[] = 'Your account cannot be added to the queue.' . ' Please write a mail message to the ' . ' <i>pear-dev</i> mailing list.'; return; } PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $e = $patchinfo->attach($id, 'patch', $_POST['patchname'], $buggie->handle, $_POST['obsoleted']);