Explorar o código

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>.
Frans de Jonge %!s(int64=2) %!d(string=hai) anos
pai
achega
d7f5ef3627
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      p/api/greader.php

+ 1 - 1
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);