removing hex2bin to avoid having to add code for this in JS and to not introduce a dependency on paste IDs always having to be hex strings
This commit is contained in:
@@ -117,7 +117,7 @@ class Paste extends AbstractModel
|
||||
// if a challenge was sent, we store the HMAC of paste ID & challenge
|
||||
if (array_key_exists('challenge', $this->_data['meta'])) {
|
||||
$this->_data['meta']['challenge'] = base64_encode(hash_hmac(
|
||||
'sha256', hex2bin($this->getId()), base64_decode($this->_data['meta']['challenge']), true
|
||||
'sha256', $this->getId(), base64_decode($this->_data['meta']['challenge']), true
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user