forked from GNUsocial/gnu-social
Replace common_good_random with common_random_hexstr
This commit is contained in:
@@ -251,9 +251,9 @@ class FeedSub extends Managed_DataObject
|
||||
protected function doSubscribe($mode)
|
||||
{
|
||||
$orig = clone($this);
|
||||
$this->verify_token = common_good_rand(16);
|
||||
$this->verify_token = common_random_hexstr(16);
|
||||
if ($mode == 'subscribe') {
|
||||
$this->secret = common_good_rand(32);
|
||||
$this->secret = common_random_hexstr(32);
|
||||
}
|
||||
$this->sub_state = $mode;
|
||||
$this->update($orig);
|
||||
|
@@ -132,7 +132,7 @@ class HubSub extends Managed_DataObject
|
||||
{
|
||||
assert($mode == 'subscribe' || $mode == 'unsubscribe');
|
||||
|
||||
$challenge = common_good_rand(32);
|
||||
$challenge = common_random_hexstr(32);
|
||||
$params = array('hub.mode' => $mode,
|
||||
'hub.topic' => $this->topic,
|
||||
'hub.challenge' => $challenge);
|
||||
|
Reference in New Issue
Block a user