aboutsummaryrefslogtreecommitdiff
path: root/p/api/greader.php
diff options
context:
space:
mode:
authorGravatar Frans de Jonge <fransdejonge@gmail.com> 2024-04-01 11:45:44 +0200
committerGravatar GitHub <noreply@github.com> 2024-04-01 11:45:44 +0200
commitd7f5ef3627aa5bffbb8c6dd14642d5f2f79c5df3 (patch)
tree4a7a9cb1bdc8f452f0a16edbb2ecb28606264ac3 /p/api/greader.php
parentc18987fae3a4f54c9e85e422c9d620c0e0d0eeb3 (diff)
greader.php: only return 'OK' on greader.php without query parameters (#6238)
It'd be clearer if the API endpoint didn't return `OK` when adding the `Email` and `Passwd` parameters. Whether it should indeed return `OK` if they're correct is debatable. In reply to <https://github.com/FreshRSS/FreshRSS/issues/5856#issuecomment-2019814077>.
Diffstat (limited to 'p/api/greader.php')
-rw-r--r--p/api/greader.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index d2fa810d0..fe6327cb0 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -992,7 +992,7 @@ final class GReaderAPI {
}
$pathInfo = urldecode($pathInfo);
$pathInfo = '' . preg_replace('%^(/api)?(/greader\.php)?%', '', $pathInfo); //Discard common errors
- if ($pathInfo == '') {
+ if ($pathInfo == '' && empty($_SERVER['QUERY_STRING'])) {
exit('OK');
}
$pathInfos = explode('/', $pathInfo);