Skip to content

Commit f620d03

Browse files
committed
Check Address against RPC
1 parent 1ba3055 commit f620d03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/pages/register/register.inc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
// Check if recaptcha is enabled, process form data if valid or disabled
2828
isset($_POST['token']) ? $token = $_POST['token'] : $token = '';
2929
if ($user->register(@$_POST['username'], @$_POST['coinaddress'], @$_POST['password1'], @$_POST['password2'], @$_POST['pin'], @$_POST['email1'], @$_POST['email2'], @$_POST['tac'], $token)) {
30-
(!$setting->getValue('accounts_confirm_email_disabled')) ? $_SESSION['POPUP'][] = array('CONTENT' => 'Please check your mailbox to activate this account') : $_SESSION['POPUP'][] = array('CONTENT' => 'Account created, please login');
30+
(!$setting->getValue('accounts_confirm_email_disabled')) ? $_SESSION['POPUP'][] = array('CONTENT' => 'Please check your mailbox to activate this account', 'TYPE' => 'alert alert-warning') : $_SESSION['POPUP'][] = array('CONTENT' => 'Account created, please login', 'TYPE' => 'alert alert-warning');
31+
} else if {
32+
if (!$this->bitcoin->validateaddress($_POST['coinaddress'])) {
33+
$_SESSION['POPUP'][] = array('CONTENT' => 'Coin address is not valid', 'TYPE' => 'alert alert-warning');
34+
}
3135
} else {
3236
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to create account: ' . $user->getError(), 'TYPE' => 'alert alert-danger');
3337
}

0 commit comments

Comments
 (0)