Skip to content

Commit 97547ca

Browse files
committed
[ADDED] Validate coin address during registration
1 parent 67b8626 commit 97547ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/classes/user.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,10 @@ public function register($username, $coinaddress, $password1, $password2, $pin,
745745
$this->setErrorMessage('Coin Address is to short');
746746
return false;
747747
}
748+
if (!$this->bitcoin->validateaddress($coinaddress)) {
749+
$this->setErrorMessage('Coin address is not valid');
750+
return false;
751+
}
748752
if (preg_match('/[^a-z_\-0-9]/i', $username)) {
749753
$this->setErrorMessage('Username may only contain alphanumeric characters');
750754
return false;

0 commit comments

Comments
 (0)