Skip to content

A free, self-hostable news aggregator…

API discard common Path Info errors (#3061)

Alexandre Alapetitea0256023a19c
diff --git a/p/api/greader.php b/p/api/greader.php
index b87387bd7..dfeb534fc 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -912,6 +912,7 @@ function markAllAsRead($streamId, $olderThanId) {
}
$pathInfo = empty($_SERVER['PATH_INFO']) ? '' : urldecode($_SERVER['PATH_INFO']);
+$pathInfo = preg_replace('%^(/api)?(/greader\.php)?%', '', $pathInfo); //Discard common errors
if ($pathInfo == '') {
exit('OK');
}