Merge pull request #946 from TheSerapher/issue-945

[FIX] Validate coin_address on account updates
This commit is contained in:
Sebastian Grewe 2013-12-10 07:55:19 -08:00
commit 153f22f9a2

View File

@ -281,7 +281,7 @@ class User extends Base {
$this->setErrorMessage('Invalid email address');
return false;
}
/* if ($this->bitcoin->can_connect() === true && !empty($address)) {
if ($this->bitcoin->can_connect() === true && !empty($address)) {
try {
$aStatus = $this->bitcoin->validateaddress($address);
if (!$aStatus['isvalid']) {
@ -296,7 +296,7 @@ class User extends Base {
$this->setErrorMessage('Unable to connect to RPC server for coin address validation');
return false;
}
*/
// Number sanitizer, just in case we fall through above
$threshold = min($this->config['ap_threshold']['max'], max(0, floatval($threshold)));
$donate = min(100, max(0, floatval($donate)));