瀏覽代碼

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 2 年之前
父節點
當前提交
d7f5ef3627
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);