소스 검색

Fix JSON Dot direct array (#6476)

* Fix JSON Dot direct array
Allow consuming a JSON array in which entries are top level
https://github.com/FreshRSS/FreshRSS/issues/6474

* Allow $ as root
Alexandre Alapetite 2 년 전
부모
커밋
c0e87f6a5c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Utils/dotNotationUtil.php

+ 1 - 1
app/Utils/dotNotationUtil.php

@@ -21,7 +21,7 @@ final class FreshRSS_dotNotation_Util
 			return static::value($default);
 		}
 		/** @var \ArrayAccess<string,mixed>|array<string,mixed> $array */
-		if ($key === null || $key === '') {
+		if (in_array($key, [null, '', '.', '$'], true)) {
 			return $array;
 		}