Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API /reader/api/0/stream/items/contents #1774

Merged
merged 10 commits into from Feb 8, 2018

A bit of sanitization

  • Loading branch information...
Alkarex committed Feb 7, 2018
commit 24648c54e0bbc85b26cf1b76859d9c195f77b1bb
@@ -628,10 +628,12 @@ protected function sqlListEntriesWhere($alias = '', $filter = null, $state = Fre
$firstId = $order === 'DESC' ? '9000000000'. '000000' : '0';
}*/
if ($firstId !== '') {
$search .= 'AND ' . $alias . 'id ' . ($order === 'DESC' ? '<=' : '>=') . $firstId . ' ';
$search .= 'AND ' . $alias . 'id ' . ($order === 'DESC' ? '<=' : '>=') . ' ? ';
$values[] = $firstId;
}
if ($date_min > 0) {
$search .= 'AND ' . $alias . 'id >= ' . $date_min . '000000 ';
$search .= 'AND ' . $alias . 'id >= ? ';
$values[] = $date_min . '000000';
}
if ($filter) {
if ($filter->getMinDate()) {
@@ -781,7 +781,10 @@ function markAllAsRead($streamId, $olderThanId) {
* all items in a timestamp range, it will have a continuation attribute.
* The same request can be re-issued with the value of that attribute put
* in this parameter to get more items */
$continuation = isset($_GET['c']) ? $_GET['c'] : '';
$continuation = isset($_GET['c']) ? trim($_GET['c']) : '';
if (!ctype_digit($continuation)) {
$continuation = '';
}
if (isset($pathInfos[5]) && $pathInfos[5] === 'contents' && isset($pathInfos[6])) {
if (isset($pathInfos[7])) {
if ($pathInfos[6] === 'feed') {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.