aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-11-28 20:11:36 +0100
committerGravatar GitHub <noreply@github.com> 2024-11-28 20:11:36 +0100
commit98b8b9f828e30d4bbc280c6c5366790353ec0b4f (patch)
treec6741022186f9c4a914fb37933f28c5e8cc475ae /p
parent15745d42b779ad14efde2932ab116f45eee39246 (diff)
Fix API use rawurldecode (#7033)
Labels or categories containing a `+` were failing. And avoid returning everything if the label/category filter is not found. Compatibility with FocusReader
Diffstat (limited to 'p')
-rw-r--r--p/api/greader.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index 218db7561..4f288bb03 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -596,7 +596,6 @@ final class GReaderAPI {
$streamId = htmlspecialchars((string)$streamId, ENT_COMPAT, 'UTF-8');
$cat = $categoryDAO->searchByName($streamId);
if ($cat != null) {
- $type = 'c';
$streamId = $cat->id();
} else {
$tagDAO = FreshRSS_Factory::createTagDao();
@@ -605,7 +604,6 @@ final class GReaderAPI {
$type = 't';
$streamId = $tag->id();
} else {
- $type = 'A';
$streamId = -1;
}
}
@@ -970,7 +968,7 @@ final class GReaderAPI {
} else {
$pathInfo = $_SERVER['PATH_INFO'];
}
- $pathInfo = urldecode($pathInfo);
+ $pathInfo = rawurldecode($pathInfo);
$pathInfo = '' . preg_replace('%^(/api)?(/greader\.php)?%', '', $pathInfo); //Discard common errors
if ($pathInfo == '' && empty($_SERVER['QUERY_STRING'])) {
exit('OK');