mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
renting: strip the protocol prefix
This commit is contained in:
parent
acc8285a90
commit
b425096b8f
1 changed files with 4 additions and 3 deletions
|
@ -296,7 +296,8 @@ class RentingController extends CommonController
|
|||
return;
|
||||
}
|
||||
|
||||
$a = explode(':', getparam('order_host'));
|
||||
$host = str_replace('stratum+tcp://', '', getparam('order_host'));
|
||||
$a = explode(':', $host);
|
||||
if(!isset($a[0]) || !isset($a[1]))
|
||||
{
|
||||
user()->setFlash('error', "invalid server url");
|
||||
|
@ -304,8 +305,8 @@ class RentingController extends CommonController
|
|||
return;
|
||||
}
|
||||
|
||||
$job->host = $a[0];
|
||||
$job->port = $a[1];
|
||||
$job->host = trim($a[0]);
|
||||
$job->port = intval($a[1]);
|
||||
|
||||
if(stripos($job->host, YAAMP_STRATUM_URL) !== false) {
|
||||
user()->setFlash('error', "invalid server url");
|
||||
|
|
Loading…
Add table
Reference in a new issue