<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoPrivateBin\i18n::_('Attach a file');?><spanclass="caret"></span></a>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoI18n::_('Attach a file');?><spanclass="caret"></span></a>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-warning"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-warning"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-warning"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoI18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoI18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-warning"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoI18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<?phpechoPrivateBin\i18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<?phpechoI18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoPrivateBin\i18n::_('Attach a file');?><spanclass="caret"></span></a>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoI18n::_('Attach a file');?><spanclass="caret"></span></a>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-error"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-error"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-error"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoI18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoI18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-error"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoI18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<?phpechoPrivateBin\i18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<?phpechoI18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoPrivateBin\i18n::_('Attach a file');?><spanclass="caret"></span></a>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoI18n::_('Attach a file');?><spanclass="caret"></span></a>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-error"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-error"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-error"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoI18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoI18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-error"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoI18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<?phpechoPrivateBin\i18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<?phpechoI18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoPrivateBin\i18n::_('Attach a file');?><spanclass="caret"></span></a>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoI18n::_('Attach a file');?><spanclass="caret"></span></a>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-warning"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-warning"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-warning"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoI18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoI18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-warning"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoI18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<?phpechoPrivateBin\i18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<?phpechoI18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoPrivateBin\i18n::_('Attach a file');?><spanclass="caret"></span></a>
<ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false"><?phpechoI18n::_('Attach a file');?><spanclass="caret"></span></a>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-warning"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-warning"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoPrivateBin\i18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<noscript><divid="noscript"role="alert"class="nonworking alert alert-warning"><spanclass="glyphicon glyphicon-exclamation-sign"aria-hidden="true"></span><?phpechoI18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"role="alert"class="hidden nonworking alert alert-danger"><spanclass="glyphicon glyphicon-alert"aria-hidden="true"></span><?phpechoI18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"role="alert"class="hidden alert alert-warning"><spanclass="glyphicon glyphicon-question-sign"aria-hidden="true"></span><?phpechoI18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<?phpechoPrivateBin\i18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<?phpechoI18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?>
<?phpechoPrivateBin\i18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?><br/><?php
if (strlen($NOTICE)): ?>
<?phpechoI18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://github.com/PrivateBin/PrivateBin/wiki">project page</a>.');?><br/>
<h2class="title"><?phpechoI18n::_('Because ignorance is bliss');?></h2><br/>
<h3class="title"><?phpecho$VERSION;?></h3>
<noscript><divid="noscript"class="nonworking"><?phpechoPrivateBin\i18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"class="nonworking"><?phpechoPrivateBin\i18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"><?phpechoPrivateBin\i18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
<noscript><divid="noscript"class="nonworking"><?phpechoI18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.');?></div></noscript>
<divid="oldienotice"class="nonworking"><?phpechoI18n::_('PrivateBin requires a modern browser to work.');?></div>
<divid="ienotice"><?phpechoI18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:');?>
$this->assertFalse($this->_model->existsComment(helper::getPasteId(), helper::getPasteId(), helper::getCommentId()), 'comment was deleted with paste');
$this->assertFalse($this->_model->read(helper::getPasteId()), 'paste can no longer be found');
$this->assertFalse($this->_model->existsComment(Helper::getPasteId(), Helper::getPasteId(), Helper::getCommentId()), 'comment was deleted with paste');
$this->assertFalse($this->_model->read(Helper::getPasteId()), 'paste can no longer be found');
}
public function testDatabaseBasedAttachmentStoreWorks()
$this->assertFalse($this->_model->existsComment(helper::getPasteId(), helper::getPasteId(), helper::getCommentId()), 'comment was deleted with paste');
$this->assertFalse($this->_model->read(helper::getPasteId()), 'paste can no longer be found');
$this->assertFalse($this->_model->existsComment(Helper::getPasteId(), Helper::getPasteId(), Helper::getCommentId()), 'comment was deleted with paste');
$this->assertFalse($this->_model->read(Helper::getPasteId()), 'paste can no longer be found');
}
public function testFileBasedAttachmentStoreWorks()
$this->assertFalse(sjcl::isValid('{"iv":"$","v":1,"iter":1000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"Gx1vA2/gQ3U","ct":"j7ImByuE5xCqD2YXm6aSyA"}'), 'invalid base64 encoding of iv');
$this->assertFalse(sjcl::isValid('{"iv":"83Ax/OdUav3SanDW9dcQPg","v":1,"iter":1000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"$","ct":"j7ImByuE5xCqD2YXm6aSyA"}'), 'invalid base64 encoding of salt');
$this->assertFalse(sjcl::isValid('{"iv":"83Ax/OdUav3SanDW9dcQPg","salt":"Gx1vA2/gQ3U","ct":"$"}'), 'invalid base64 encoding of ct');
$this->assertFalse(sjcl::isValid('{"iv":"MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=","v":1,"iter":1000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"Gx1vA2/gQ3U","ct":"j7ImByuE5xCqD2YXm6aSyA"}'), 'iv to long');
$this->assertFalse(sjcl::isValid('{"iv":"83Ax/OdUav3SanDW9dcQPg","v":1,"iter":1000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=","ct":"j7ImByuE5xCqD2YXm6aSyA"}'), 'salt to long');
$this->assertFalse(sjcl::isValid('{"iv":"83Ax/OdUav3SanDW9dcQPg","v":1,"iter":1000,"ks":128,"ts":63,"mode":"ccm","adata":"","cipher":"aes","salt":"Gx1vA2/gQ3U","ct":"j7ImByuE5xCqD2YXm6aSyA"}'), 'invalid tag length');
$this->assertFalse(Sjcl::isValid('{"iv":"MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=","v":1,"iter":1000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"Gx1vA2/gQ3U","ct":"j7ImByuE5xCqD2YXm6aSyA"}'), 'iv to long');
$this->assertFalse(Sjcl::isValid('{"iv":"83Ax/OdUav3SanDW9dcQPg","v":1,"iter":1000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=","ct":"j7ImByuE5xCqD2YXm6aSyA"}'), 'salt to long');
$this->assertFalse(Sjcl::isValid('{"iv":"83Ax/OdUav3SanDW9dcQPg","v":1,"iter":1000,"ks":128,"ts":63,"mode":"ccm","adata":"","cipher":"aes","salt":"Gx1vA2/gQ3U","ct":"j7ImByuE5xCqD2YXm6aSyA"}'), 'invalid tag length');