From d7f5ef3627aa5bffbb8c6dd14642d5f2f79c5df3 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Mon, 1 Apr 2024 11:45:44 +0200 Subject: 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 . --- p/api/greader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'p/api') 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); -- cgit v1.2.3