Changeset 7495 for trunk/register.php
- Timestamp:
- Oct 30, 2010, 1:32:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/register.php
r6363 r7495 41 41 if (isset($_POST['submit'])) 42 42 { 43 if (!verify_ephemeral_key(@$_POST['key'])) 44 { 45 set_status_header(403); 46 array_push($errors, 'Invalid/expired form key'); 47 } 48 43 49 if ($_POST['password'] != $_POST['password_conf']) 44 50 { … … 47 53 48 54 $errors = 49 register_user( htmlspecialchars($_POST['login'],ENT_COMPAT,'utf-8'),55 register_user($_POST['login'], 50 56 $_POST['password'], 51 57 $_POST['mail_address'], … … 59 65 redirect(make_index_url()); 60 66 } 67 $registration_post_key = get_ephemeral_key(2); 68 } 69 else 70 { 71 $registration_post_key = get_ephemeral_key(6); 61 72 } 62 73 63 $login = !empty($_POST['login'])? $_POST['login']:'';64 $email = !empty($_POST['mail_address'])? $_POST['mail_address']:'';74 $login = !empty($_POST['login'])?htmlspecialchars(stripslashes($_POST['login'])):''; 75 $email = !empty($_POST['mail_address'])?htmlspecialchars(stripslashes($_POST['mail_address'])):''; 65 76 66 77 //----------------------------------------------------- template initialization … … 75 86 $template->assign(array( 76 87 'U_HOME' => make_index_url(), 77 88 'F_KEY' => $registration_post_key, 78 89 'F_ACTION' => 'register.php', 79 'F_LOGIN' => htmlspecialchars($login, ENT_QUOTES, 'utf-8'),80 'F_EMAIL' => htmlspecialchars($email, ENT_QUOTES, 'utf-8')90 'F_LOGIN' => $login, 91 'F_EMAIL' => $email 81 92 )); 82 93
Note: See TracChangeset
for help on using the changeset viewer.