if (isset($_GET['p']) and isset($_GET['s']) ) { # p = user.secret s = user.username
- $user = get_user_info_from_db("username", "$s");
+ $user = get_user_info_from_db("username", $_GET['s']);
if (!empty($user)) {
exit;
}
- if ($user->secret == $p) { // They have provided the secret key to get in
+ if ($user->secret == $_GET['p']) { // They have provided the secret key to get in
if (!set_field("user", "confirmed", 1, "id", $user->id)) {
error("Could not confirm this user!");
function create_virtual_nameprefix($nameprefix, $datasetinput) {
// This default implementation is sometimes overridden
if (!ereg('([0-9]+)' . $this->name() . '$', $nameprefix, $regs)) {
- error("Malformed nameprefix $nameprefix");
+ error("Wrongly formatted nameprefix $nameprefix");
}
$virtualqtype = $this->get_virtual_qtype();
return $nameprefix . $regs[1] . $virtualqtype->name();
function extract_response($rawresponse, $nameprefix) {
if (!ereg('^dataset([;:0-9A-Za-z+/=]+)-(.*)$',
$rawresponse->answer, $regs)) {
- error ("Malformated raw response answer $rawresponse->answer");
+ error ("Wrongly formatted raw response answer $rawresponse->answer");
}
// Truncate raw response to fit the virtual qtype