mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-08-03 20:14:27 -04:00
sending challenge on paste creation, adding logic to store and check it on view requests
This commit is contained in:
parent
d0c8975b89
commit
79db7ddafc
13 changed files with 247 additions and 14 deletions
|
@ -21,6 +21,10 @@ class FormatV2Test extends PHPUnit_Framework_TestCase
|
|||
$paste['ct'] = '$';
|
||||
$this->assertFalse(FormatV2::isValid($paste), 'invalid base64 encoding of ct');
|
||||
|
||||
$paste = Helper::getPastePost();
|
||||
$paste['meta']['challenge'] = '$';
|
||||
$this->assertFalse(FormatV2::isValid($paste), 'invalid base64 encoding of ct');
|
||||
|
||||
$paste = Helper::getPastePost();
|
||||
$paste['ct'] = 'bm9kYXRhbm9kYXRhbm9kYXRhbm9kYXRhbm9kYXRhCg==';
|
||||
$this->assertFalse(FormatV2::isValid($paste), 'low ct entropy');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue