fix display of v2 pastes in JS, fixing parsing of comments in PHP, avoid exposing expiration date (we provide time_to_live, would allow calculation of creation date of paste)

This commit is contained in:
El RIDO 2019-05-15 07:44:03 +02:00
parent cc1c55129f
commit 09162a3c57
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
10 changed files with 136 additions and 92 deletions

View file

@ -213,7 +213,7 @@ class Controller
array_key_exists('parentid', $data) &&
!empty($data['parentid']);
if (!FormatV2::isValid($data, $isComment)) {
return $this->_return_message(1, 'Invalid data.');
return $this->_return_message(1, I18n::_('Invalid data.'));
}
$sizelimit = $this->_conf->getKey('sizelimit');
// Ensure content is not too big.
@ -240,7 +240,7 @@ class Controller
}
$this->_return_message(0, $comment->getId());
} else {
$this->_return_message(1, 'Invalid data.');
$this->_return_message(1, I18n::_('Invalid data.'));
}
}
// The user posts a standard paste.