-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.php
51 lines (46 loc) · 1.87 KB
/
signup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
//Load the auth object generation function.
require_once 'common_auth.php';
$auth=get_auth();
//There should only be 2 variables.
if(count($_GET)!=2)
{
$auth->log_error(AERR_HACK,__FUNCTION__,AERR_MSG_HACK,'','',array('var_names'=>implode(',',array_keys($_GET)),'var_values'=>implode(',',array_values($_GET))));
exit;
}
//One of the variables needs to be the userid.
if(!isset($_GET['userid']))
{
$auth->log_error(AERR_HACK,__FUNCTION__,AERR_MSG_HACK,'','',array('var_names'=>implode(',',array_keys($_GET)),'var_values'=>implode(',',array_values($_GET))));
exit;
}
//Check for new accounts.
if(isset($_GET['confirm_hash']))
{
//Load the auth object generation function.
$result=$auth->confirm_account($_GET['userid'],$_GET['confirm_hash']);
if($result===false)
header('Location: account_confirmed.php');
$auth->log_error(AERR_HACK,__FUNCTION__,AERR_MSG_BAD_AUTHCODE,'','',array('var_names'=>implode(',',array_keys($_GET)),'var_values'=>implode(',',array_values($_GET))));
exit;
}
//Check for email address reconfirmations.
if(isset($_GET['reconfirm_hash']))
{
$result=$auth->confirm_email_change($_GET['userid'],$_GET['reconfirm_hash']);
if($result===false)
header('Location: address_confirmed.php');
$auth->log_error(AERR_HACK,__FUNCTION__,AERR_MSG_BAD_AUTHCODE,'','',array('var_names'=>implode(',',array_keys($_GET)),'var_values'=>implode(',',array_values($_GET))));
exit;
}
//Check for account reset confirmations.
if(isset($_GET['reset_hash']))
{
$result=$auth->confirm_account_reset($_GET['userid'],$_GET['reset_hash']);
if($result===false)
header('Location: account_reset.php');
$auth->log_error(AERR_HACK,__FUNCTION__,AERR_MSG_BAD_AUTHCODE,'','',array('var_names'=>implode(',',array_keys($_GET)),'var_values'=>implode(',',array_values($_GET))));
exit;
}
exit;
?>