mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 14:36:08 -04:00
implement version 2 format validation, changing ID checksum algorithm, resolves #49
This commit is contained in:
parent
ed676acac3
commit
3338bd792e
12 changed files with 233 additions and 185 deletions
|
@ -15,7 +15,7 @@ namespace PrivateBin\Model;
|
|||
use Exception;
|
||||
use Identicon\Identicon;
|
||||
use PrivateBin\Persistence\TrafficLimiter;
|
||||
use PrivateBin\Sjcl;
|
||||
use PrivateBin\FormatV2;
|
||||
use PrivateBin\Vizhash16x16;
|
||||
|
||||
/**
|
||||
|
@ -183,7 +183,7 @@ class Comment extends AbstractModel
|
|||
*/
|
||||
public function setNickname($nickname)
|
||||
{
|
||||
if (!Sjcl::isValid($nickname)) {
|
||||
if (!FormatV2::isValid($nickname)) {
|
||||
throw new Exception('Invalid data.', 66);
|
||||
}
|
||||
$this->_data->meta->nickname = $nickname;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue