repo stringlengths 5 53 | pr_number int32 1 321k | task_type stringclasses 2
values | issue_text stringlengths 0 81.2k | pr_title stringlengths 1 319 | pr_body stringlengths 0 105k | base_sha stringlengths 40 40 | head_sha stringlengths 40 40 | gold_diff stringlengths 0 202M | changed_files listlengths 0 100 | review_threads listlengths 0 100 | test_patch stringlengths 0 23.4M | merged bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
D4Vinci/Scrapling | 192 | issue_to_patch | test(ai): add _normalize_credentials edge case coverage | ## What
Extends `tests/ai/test_ai_mcp.py` with a `TestNormalizeCredentials` class covering edge cases for the `_normalize_credentials` helper that were previously untested:
- `None` input → returns `None`
- Empty dict `{}` → returns `None` (falsy check)
- Valid dict with both keys → returns correct `(username, passwo... | c7f0db912c8be79c42a92f6202429e14ebf920ef | 656dbc7d121ff408d0ce4469442dda1d29796e07 | [
"tests/ai/test_ai_mcp.py"
] | [] | diff --git a/tests/ai/test_ai_mcp.py b/tests/ai/test_ai_mcp.py
index 4a9e3085..b2c4a710 100644
--- a/tests/ai/test_ai_mcp.py
+++ b/tests/ai/test_ai_mcp.py
@@ -1,7 +1,7 @@
import pytest
import pytest_httpbin
-from scrapling.core.ai import ScraplingMCPServer, ResponseModel
+from scrapling.core.ai import ScraplingMCPS... | true | ||
D4Vinci/Scrapling | 197 | issue_to_patch | fix: add max retry limit to _get_page_content to prevent infinite loop | ## What
Add a bounded retry limit (default 10 attempts = ~5s) to `_get_page_content` and `_get_async_page_content` in `ResponseFactory`.
## Why
Both methods use `while True` to retry `page.content()` on `PlaywrightError`. This is a workaround for a known Windows issue ([playwright#16108](https://github.com/microsoft... | d9932f230879713ea6578b7d8d61477dbc11d2d6 | 8e4e59e13ef3e2557d7cb444565414062655c038 | diff --git a/scrapling/engines/toolbelt/convertor.py b/scrapling/engines/toolbelt/convertor.py
index 1a8d799b..18601536 100644
--- a/scrapling/engines/toolbelt/convertor.py
+++ b/scrapling/engines/toolbelt/convertor.py
@@ -187,34 +187,34 @@ async def _async_process_response_history(
return history
@clas... | [
"scrapling/engines/toolbelt/convertor.py"
] | [] | true | ||
D4Vinci/Scrapling | 200 | issue_to_patch | test: add edge case tests for filter, iterancestors, and find_similar | ## Summary
This PR adds three new test files covering edge cases that were missing from the existing test suite (current coverage ~90–92%).
### New test files
#### `tests/parser/test_selectors_filter.py`
Covers `Selectors.filter()` edge cases:
- Chained `.filter().filter()` calls
- Empty result returns `Selectors` (... | 1dc0b7a1bd553d005bf7eeee546da105d9f4baf6 | bf9e2da329e0a18909a45fd47ebc51120a0722d3 | [
"tests/parser/test_ancestor_navigation.py",
"tests/parser/test_find_similar_advanced.py",
"tests/parser/test_selectors_filter.py"
] | [] | diff --git a/tests/parser/test_ancestor_navigation.py b/tests/parser/test_ancestor_navigation.py
new file mode 100644
index 00000000..1814ec5d
--- /dev/null
+++ b/tests/parser/test_ancestor_navigation.py
@@ -0,0 +1,66 @@
+"""
+Tests for Selector.iterancestors() and Selector.find_ancestor() methods.
+Target file: tests/... | true | ||
D4Vinci/Scrapling | 201 | issue_to_patch | fix: preserve HTTP method across retries in spider session | `SessionManager.fetch()` pops `method` from `_session_kwargs`,
which mutates the original request dict. When the engine retries
a blocked request via `request.copy()`, the copy no longer has
`method`, so it defaults to GET.
Steps to reproduce:
1. Yield `Request(url, method="POST", data=...)`
2. Target returns a respon... | 136c3897879634db2228afe14632a1e912d838ec | 4c07b294ae3235bfd0f1797d2bc6f56a65a33101 | diff --git a/scrapling/spiders/session.py b/scrapling/spiders/session.py
index cc07042b..536be6d5 100644
--- a/scrapling/spiders/session.py
+++ b/scrapling/spiders/session.py
@@ -112,10 +112,12 @@ async def fetch(self, request: Request) -> Response:
client = session._client
if isinst... | [
"scrapling/spiders/session.py",
"tests/spiders/test_session.py"
] | [] | diff --git a/tests/spiders/test_session.py b/tests/spiders/test_session.py
index c1eed5d8..0c422ef7 100644
--- a/tests/spiders/test_session.py
+++ b/tests/spiders/test_session.py
@@ -1,9 +1,12 @@
"""Tests for the SessionManager class."""
+from unittest.mock import AsyncMock, PropertyMock
+
from scrapling.core._type... | true | |
D4Vinci/Scrapling | 194 | issue_to_patch | test: add coverage for TextHandler regex paths and TextHandlers.re() | ## What
Adds test coverage for previously untested code paths in `scrapling/core/custom_types.py`:
- **`TextHandler.re(check_match=True)`**: verifies it returns `bool` (not `TextHandlers`)
- **`TextHandler.re(replace_entities=False)`**: entity preservation path
- **`TextHandler.re()` with capture groups**: verifies f... | cc6c0dbfb91c75b014634f4a3a70eb8bbb337c8b | 5123590a1508988e3dba27f5c873a302bdf26fc9 | [
"tests/parser/test_parser_advanced.py"
] | [
{
"comment": "Remove this line because `get_all` is forgotten; it should have been removed in the `TextHandler` class when we replaced it with `getall` in `Selector`. So this test line will be broken later.",
"path": "tests/parser/test_parser_advanced.py",
"hunk": "@@ -266,6 +328,37 @@ def test_text_han... | diff --git a/tests/parser/test_parser_advanced.py b/tests/parser/test_parser_advanced.py
index f34ba5c7..969ccc31 100644
--- a/tests/parser/test_parser_advanced.py
+++ b/tests/parser/test_parser_advanced.py
@@ -250,6 +250,68 @@ def test_text_handler_regex(self):
matches = text3.re(r"He l lo", clean_match=True,... | true | ||
D4Vinci/Scrapling | 194 | comment_to_fix | test: add coverage for TextHandler regex paths and TextHandlers.re() | Remove this line because `get_all` is forgotten; it should have been removed in the `TextHandler` class when we replaced it with `getall` in `Selector`. So this test line will be broken later. | cc6c0dbfb91c75b014634f4a3a70eb8bbb337c8b | 5123590a1508988e3dba27f5c873a302bdf26fc9 | diff --git a/tests/parser/test_parser_advanced.py b/tests/parser/test_parser_advanced.py
index f34ba5c7..969ccc31 100644
--- a/tests/parser/test_parser_advanced.py
+++ b/tests/parser/test_parser_advanced.py
@@ -250,6 +250,68 @@ def test_text_handler_regex(self):
matches = text3.re(r"He l lo", clean_match=True,... | [
"tests/parser/test_parser_advanced.py"
] | [
{
"comment": "Remove this line because `get_all` is forgotten; it should have been removed in the `TextHandler` class when we replaced it with `getall` in `Selector`. So this test line will be broken later.",
"path": "tests/parser/test_parser_advanced.py",
"hunk": "@@ -266,6 +328,37 @@ def test_text_han... | true | ||
D4Vinci/Scrapling | 196 | issue_to_patch | fix: replace bare raise with return False in _restore_from_checkpoint | ## What
Replace `raise` (bare raise with no active exception) with `return False` in `CrawlerEngine._restore_from_checkpoint()`.
## Why
When `_checkpoint_system_enabled` is `False`, the current code executes a bare `raise` statement. Since there is no active exception in this context, Python raises `RuntimeError: No... | 440da112597222026e56f4cc8c7a6cf7817ef0fc | bcd45e47bb6ee87873e51df8ed855a13b2310428 | diff --git a/scrapling/spiders/engine.py b/scrapling/spiders/engine.py
index 416911db..d77f8383 100644
--- a/scrapling/spiders/engine.py
+++ b/scrapling/spiders/engine.py
@@ -205,7 +205,7 @@ async def _restore_from_checkpoint(self) -> bool:
Returns True if successfully restored, False otherwise.
"""
... | [
"scrapling/spiders/engine.py"
] | [] | true | ||
D4Vinci/Scrapling | 183 | issue_to_patch | v0.4.2 | **A new maintenance update with important changes**
#### Bug fixes
- The function `get_all_text()` now captures tail text nodes. This will make the MCP server and commands see text that was missed before ([#168](https://github.com/D4Vinci/Scrapling/pull/168)). Thanks @mhillebrand
- Referer now returns a bare Googl... | b9b5bb0c8011f3dcb844c074c2bd91ce44d77edd | 6ec40ad19da84cef683ac5f45fed446bb0d38e99 | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 790170ed..1cf61397 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -73,7 +73,7 @@ jobs:
- name: Install all browsers dependencies
run: |
python3 -m pip install --upgrade pip
- python3 -... | [
".github/workflows/tests.yml",
"README.md",
"agent-skill/Scrapling-Skill.zip",
"agent-skill/Scrapling-Skill/SKILL.md",
"agent-skill/Scrapling-Skill/examples/README.md",
"agent-skill/Scrapling-Skill/references/fetching/dynamic.md",
"agent-skill/Scrapling-Skill/references/fetching/static.md",
"agent-ski... | [] | diff --git a/tests/fetchers/test_utils.py b/tests/fetchers/test_utils.py
index 0a4be9fe..bebb5fd8 100644
--- a/tests/fetchers/test_utils.py
+++ b/tests/fetchers/test_utils.py
@@ -7,7 +7,6 @@
create_async_intercept_handler,
)
from scrapling.engines.toolbelt.fingerprints import (
- generate_convincing_referer,
... | true | |
D4Vinci/Scrapling | 179 | issue_to_patch | fix: return bare Google URL in referer instead of search query | ## Summary
Real browsers send `https://www.google.com/` as the `Referer` header when clicking Google search results — not the full search URL with query parameters. The previous `https://www.google.com/search?q=<domain>` format is a detectable fingerprinting signal that the referer is spoofed.
- Changed `generate_con... | 11bc08fbaa42f1ff94eab980af76f54c7b4bab21 | b0c8448f8151487959cc993106df9c93f3db9992 | diff --git a/scrapling/engines/toolbelt/fingerprints.py b/scrapling/engines/toolbelt/fingerprints.py
index 67746917..d84a682a 100644
--- a/scrapling/engines/toolbelt/fingerprints.py
+++ b/scrapling/engines/toolbelt/fingerprints.py
@@ -20,13 +20,13 @@
@lru_cache(10, typed=True)
def generate_convincing_referer(url: s... | [
"scrapling/engines/toolbelt/fingerprints.py",
"tests/fetchers/test_utils.py"
] | [] | diff --git a/tests/fetchers/test_utils.py b/tests/fetchers/test_utils.py
index 0a4be9fe..526f898a 100644
--- a/tests/fetchers/test_utils.py
+++ b/tests/fetchers/test_utils.py
@@ -209,8 +209,7 @@ def test_generate_convincing_referer(self):
url = "https://sub.example.com/page.html"
result = generate_con... | true | |
D4Vinci/Scrapling | 168 | issue_to_patch | fix: Selector.get_all_text() doesn't get all text #167 | - Selector.get_all_text() no longer ignores tail text nodes
- Added new unit test
<!--
You are amazing! Thanks for contributing to Scrapling!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate... | 49db2b643b0d0c051eae391f069cdd08db35f36f | 7cbe566acdbc3cfc78a375b454bf6c226e10a665 | diff --git a/scrapling/parser.py b/scrapling/parser.py
index 166e6ea6..eced0a9f 100644
--- a/scrapling/parser.py
+++ b/scrapling/parser.py
@@ -58,6 +58,7 @@
_find_all_elements_with_spaces = XPath(
".//*[normalize-space(text())]"
) # This selector gets all elements with text content
+_find_all_text_nodes = XPath... | [
"scrapling/parser.py",
"tests/parser/test_parser_advanced.py"
] | [
{
"comment": "Can you move this test to `test_parser_advanced.py` instead?",
"path": "tests/parser/test_general.py",
"hunk": "",
"resolving_sha": "7cbe566acdbc3cfc78a375b454bf6c226e10a665",
"resolving_diff": ""
}
] | diff --git a/tests/parser/test_parser_advanced.py b/tests/parser/test_parser_advanced.py
index 57086ba8..f34ba5c7 100644
--- a/tests/parser/test_parser_advanced.py
+++ b/tests/parser/test_parser_advanced.py
@@ -183,6 +183,33 @@ def test_text_operations_edge_cases(self, complex_html):
text = page.get_all_text(v... | true | |
D4Vinci/Scrapling | 154 | issue_to_patch | v0.4.1 | **A new update with many important changes**
## 🚀 New Stuff and quality of life changes
- **Improved regex precision** for Cloudflare challenge detection (Thanks to @Rinz27 [#133](https://github.com/D4Vinci/Scrapling/pull/133))
- **Improved the speed and efficiency** of the Cloudflare solver. Now it is nearly twi... | b54a49b717b04a56020df0cbbb6e82a69bc921ee | d0cc6e5a3d8f627dc573eac2b358db492e27ecb5 | diff --git a/.gitignore b/.gitignore
index f27bc086..77d12109 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,7 @@
+# local files
site/*
+local_tests/*
+.mcpregistry_*
# AI related files
.claude/*
diff --git a/MANIFEST.in b/MANIFEST.in
index 8c168dd5..aa9bf232 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7... | [
".gitignore",
"MANIFEST.in",
"README.md",
"docs/README_AR.md",
"docs/README_CN.md",
"docs/README_DE.md",
"docs/README_ES.md",
"docs/README_JP.md",
"docs/README_RU.md",
"docs/ai/mcp-server.md",
"docs/index.md",
"docs/requirements.txt",
"pyproject.toml",
"scrapling/__init__.py",
"scrapling... | [] | diff --git a/tests/fetchers/test_utils.py b/tests/fetchers/test_utils.py
index 4637a630..0a4be9fe 100644
--- a/tests/fetchers/test_utils.py
+++ b/tests/fetchers/test_utils.py
@@ -1,12 +1,10 @@
import pytest
-from pathlib import Path
from scrapling.engines.toolbelt.custom import StatusText, Response
from scrapling.... | true | |
D4Vinci/Scrapling | 133 | issue_to_patch | Fix: Improve regex precision for Cloudflare challenge detection | <!--
You are amazing! Thanks for contributing to Scrapling!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a... | 558e9a6fa0a33a91edac0f66753a9d14cc29c8d7 | 50e0be5c1cd2d3b954c30f61ec945ee973d446a3 | diff --git a/scrapling/engines/_browsers/_stealth.py b/scrapling/engines/_browsers/_stealth.py
index 3c9ea581..fe71865a 100644
--- a/scrapling/engines/_browsers/_stealth.py
+++ b/scrapling/engines/_browsers/_stealth.py
@@ -22,7 +22,7 @@
from scrapling.engines._browsers._base import SyncSession, AsyncSession, StealthyS... | [
"scrapling/engines/_browsers/_stealth.py"
] | [] | true | ||
D4Vinci/Scrapling | 137 | issue_to_patch | fix: make MCP get schemas validator-safe | ## Summary
- Use MCP-friendly input types for `get` and `bulk_get` by changing `cookies`, `proxy_auth`, and `auth` to dictionary-based schemas.
- Add `_NormalizeCredentials` to convert auth dictionaries into tuple credentials expected by the fetchers.
- Update parameter docs to reflect the new dictionary format for bas... | bcc93f392d587772124d3af4bb0d59cc94d26e55 | 6c12c196ac45ed8b7f09a051219bad80b5570eba | diff --git a/scrapling/core/ai.py b/scrapling/core/ai.py
index 171359a5..ad575f9a 100644
--- a/scrapling/core/ai.py
+++ b/scrapling/core/ai.py
@@ -42,6 +42,20 @@ def _ContentTranslator(content: Generator[str, None, None], page: _ScraplingResp
return ResponseModel(status=page.status, content=[result for result in c... | [
"scrapling/core/ai.py"
] | [] | true | ||
D4Vinci/Scrapling | 144 | issue_to_patch | Upgrade GitHub Actions to latest versions | ## Summary
Upgrade GitHub Actions to their latest versions for improved features, bug fixes, and security updates.
## Changes
| Action | Old Version(s) | New Version | Release | Files |
|--------|---------------|-------------|---------|-------|
| `docker/build-push-action` | [`v5`](https://github.com/docker/build-pu... | 908ede1c6492c2682b8c53c7a395ee5620e607ce | 46fd1506dcbe7eae291de72d21f31ee315c38ec3 | diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml
index 201a99aa..2c0948ca 100644
--- a/.github/workflows/docker-build.yml
+++ b/.github/workflows/docker-build.yml
@@ -70,7 +70,7 @@ jobs:
org.opencontainers.image.documentation=https://scrapling.readthedocs.io/en/latest/
... | [
".github/workflows/docker-build.yml",
".github/workflows/release-and-publish.yml"
] | [] | true | ||
D4Vinci/Scrapling | 143 | issue_to_patch | Upgrade GitHub Actions for Node 24 compatibility | ## Summary
Upgrade GitHub Actions to their latest versions to ensure compatibility with Node 24, as Node 20 will reach end-of-life in April 2026.
## Changes
| Action | Old Version(s) | New Version | Release | Files |
|--------|---------------|-------------|---------|-------|
| `actions/cache` | [`v4`](https://github... | 7ebe3a01a33364f7287309e5b80fc0771462d326 | ccce0fc552cc11017a99fbdae762c31d9a80dd40 | diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml
index ada0ec27..5c32328b 100644
--- a/.github/workflows/code-quality.yml
+++ b/.github/workflows/code-quality.yml
@@ -37,12 +37,12 @@ jobs:
steps:
- name: Checkout code
- uses: actions/checkout@v4
+ uses: ac... | [
".github/workflows/code-quality.yml",
".github/workflows/docker-build.yml",
".github/workflows/release-and-publish.yml",
".github/workflows/tests.yml"
] | [] | true | ||
D4Vinci/Scrapling | 131 | issue_to_patch | v0.4 | **The biggest release of Scrapling yet — introducing the Spider framework, proxy rotation, and major parser improvements**
This release brings a fully async spider/crawling framework, intelligent proxy management, and significant API changes that make Scrapling more powerful and consistent. Please review the breakin... | d8fe909c8b8e437e840bfcb33f629bf76ea814be | 95ad2842e9c29508e2863d5946e63a97e7f21844 | diff --git a/.bandit.yml b/.bandit.yml
index 5acd3724..bd06507f 100644
--- a/.bandit.yml
+++ b/.bandit.yml
@@ -6,4 +6,6 @@ skips:
- B404 # Using subprocess library
- B602 # subprocess call with shell=True identified
- B110 # Try, Except, Pass detected.
-- B104 # Possible binding to all interfaces.
\ No newline a... | [
".bandit.yml",
".github/ISSUE_TEMPLATE/04-docs_issue.yml",
".github/workflows/code-quality.yml",
".gitignore",
".readthedocs.yaml",
"README.md",
"benchmarks.py",
"docs/README_AR.md",
"docs/README_CN.md",
"docs/README_DE.md",
"docs/README_ES.md",
"docs/README_JP.md",
"docs/README_RU.md",
"d... | [] | diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py
index e2f86f3c..39345d0a 100644
--- a/tests/cli/test_cli.py
+++ b/tests/cli/test_cli.py
@@ -17,7 +17,6 @@ def configure_selector_mock():
mock_response.html_content = "<html><body>Test content</body></html>"
mock_response.encoding = "utf-8"
mock_r... | true | |
D4Vinci/Scrapling | 130 | issue_to_patch | V4 | Moving the work from the `v4` branch to the main `dev` branch. Almost done with this version, just need to update the documentation. | 9229cef89547a48869f349dd9b95a34927b63ba1 | e6880939742d71a28eefdb91962fcc800120cbec | diff --git a/.bandit.yml b/.bandit.yml
index 5acd3724..bd06507f 100644
--- a/.bandit.yml
+++ b/.bandit.yml
@@ -6,4 +6,6 @@ skips:
- B404 # Using subprocess library
- B602 # subprocess call with shell=True identified
- B110 # Try, Except, Pass detected.
-- B104 # Possible binding to all interfaces.
\ No newline a... | [
".bandit.yml",
".github/workflows/code-quality.yml",
".github/workflows/tests.yml",
".gitignore",
".readthedocs.yaml",
"README.md",
"benchmarks.py",
"docs/README_AR.md",
"docs/README_CN.md",
"docs/README_DE.md",
"docs/README_ES.md",
"docs/README_JP.md",
"docs/README_RU.md",
"docs/assets/co... | [] | diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py
index e2f86f3c..39345d0a 100644
--- a/tests/cli/test_cli.py
+++ b/tests/cli/test_cli.py
@@ -17,7 +17,6 @@ def configure_selector_mock():
mock_response.html_content = "<html><body>Test content</body></html>"
mock_response.encoding = "utf-8"
mock_r... | true | |
D4Vinci/Scrapling | 124 | issue_to_patch | Cookie is not persistence from AsyncStealthySession
### Have you searched if there an existing issue for this?
- [x] I have searched the existing issues
### Python version (python --version)
3.13
### Scrapling version (scrapling.__version__)
0.3.13
### Dependencies version (pip3 freeze)
scrapling[all] >= 0.3.13... | v0.3.14 | **A minor maintenance update to fix issues that happened with some devices**
- Disabled the incognito mode in `StealthyFetcher` and its session classes since it made cookies not persistent across pages on Windows devices. It didn't happen on MacOS and Linux (Fixes [#123](https://github.com/D4Vinci/Scrapling/issues/1... | 6ad2ecb9f209f0525da13a105275c58438c5f199 | 2f87507afe044fec373e914a195073b0d78d3f48 | diff --git a/pyproject.toml b/pyproject.toml
index a5b6f5c1..f6fb8ab3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "scrapling"
# Static version instead of a dynamic version so we can get better layer caching while building docker, check the... | [
"pyproject.toml",
"scrapling/__init__.py",
"scrapling/engines/constants.py",
"setup.cfg",
"tests/core/test_storage_core.py",
"tests/fetchers/test_constants.py"
] | [] | diff --git a/tests/core/test_storage_core.py b/tests/core/test_storage_core.py
index 241ac0b4..18272942 100644
--- a/tests/core/test_storage_core.py
+++ b/tests/core/test_storage_core.py
@@ -17,12 +17,16 @@ def test_sqlite_storage_with_file(self):
"""Test SQLite storage with an actual file"""
with tem... | true |
D4Vinci/Scrapling | 122 | issue_to_patch | v0.3.13 | **This is a big update with many improvements across many places, but also many breaking changes for good reasons. Please read the below before updating**
* For many reasons, we decided that from now on, we will stop using Camoufox entirely, and we might switch back to it in the future if its development continues. ... | 2e5152f7905dcb701849bcfd708c2af221ed1551 | b5fdb71b52b6a74710097046730b280ee07f6854 | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ecdfa896..be3bbca2 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -58,7 +58,7 @@ jobs:
- name: Install all browsers dependencies
run: |
python3 -m pip install --upgrade pip
- python3 -... | [
".github/workflows/tests.yml",
".readthedocs.yaml",
"CONTRIBUTING.md",
"Dockerfile",
"docs/README.md",
"docs/README_AR.md",
"docs/README_CN.md",
"docs/README_DE.md",
"docs/README_ES.md",
"docs/README_JP.md",
"docs/README_RU.md",
"docs/ai/mcp-server.md",
"docs/benchmarks.md",
"docs/cli/extr... | [] | diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py
index 4a79c251..e2f86f3c 100644
--- a/tests/cli/test_cli.py
+++ b/tests/cli/test_cli.py
@@ -156,7 +156,6 @@ def test_extract_fetch_command(self, runner, tmp_path, html_url):
html_url,
str(output_file),
... | true | |
D4Vinci/Scrapling | 119 | issue_to_patch | v0.3.12 | ## What's Changed
- Added a new argument to `DynamicSession`/`AsyncDynamicSession` classes called `timezone_id`, which allows you to set the timezone of the browser so that it matches the timezone of the Proxy/VPN you are using. That way, the websites can't detect that you are using a proxy through the timezone mismat... | f6862f817040486ed649ec21a4caccac5348322c | a7b55d4a746bd75f98ce32e9f7a940b7fa0b22f1 | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 368c9a8d..ecdfa896 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -58,7 +58,7 @@ jobs:
- name: Install all browsers dependencies
run: |
python3 -m pip install --upgrade pip
- python3 -... | [
".github/workflows/tests.yml",
"docs/fetching/dynamic.md",
"pyproject.toml",
"scrapling/__init__.py",
"scrapling/cli.py",
"scrapling/engines/_browsers/_base.py",
"scrapling/engines/_browsers/_camoufox.py",
"scrapling/engines/_browsers/_config_tools.py",
"scrapling/engines/_browsers/_controllers.py",... | [] | diff --git a/tests/fetchers/sync/test_dynamic.py b/tests/fetchers/sync/test_dynamic.py
index 2b1a54d6..e044e335 100644
--- a/tests/fetchers/sync/test_dynamic.py
+++ b/tests/fetchers/sync/test_dynamic.py
@@ -62,6 +62,7 @@ def scroll_page(page):
"real_chrome": True,
"wait": 10,
... | true | |
D4Vinci/Scrapling | 114 | issue_to_patch | v0.3.11 | ## What's Changed
- Added a better logic for handling timeout errors when the `network_idle` argument is used on an unstable website (websites with media playing, etc.)
- Fixed the autocompletion for the `stealthy_fetch` shortcut in the Web Scraping Shell
_🙏 Special thanks to our [Discord community](https://disco... | ab0be951294a08739e6e2b33b1aab27c1a59c207 | 51d347270f1ecf68fbaff0beb276fc1e96467ecd | diff --git a/pyproject.toml b/pyproject.toml
index cd2145b5..c9e04cca 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "scrapling"
# Static version instead of a dynamic version so we can get better layer caching while building docker, check the... | [
"pyproject.toml",
"scrapling/__init__.py",
"scrapling/core/shell.py",
"scrapling/engines/_browsers/_base.py",
"setup.cfg",
"tox.ini"
] | [] | true | ||
D4Vinci/Scrapling | 113 | issue_to_patch | v0.3.10 | **A maintenance update with many significant changes and possible breaking changes**
- **Solved** all encoding issues by using a better approach which will handle web pages where encoding is not correctly declared (Thanks to @Kemsty2's efforts for pointing that out in [#110](https://github.com/D4Vinci/Scrapling/issu... | 48313307d02f9d8fc87ca7d6007043d00fbc433a | eb15aae444a0c2f383b00ec572be707366c2f27e | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index f1a73431..368c9a8d 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -116,7 +116,7 @@ jobs:
with:
path: .tox
# Include python version and os in the cache key
- key: tox-v1-${{ runner.... | [
".github/workflows/tests.yml",
"docs/README.md",
"docs/README_AR.md",
"docs/README_CN.md",
"docs/README_DE.md",
"docs/README_ES.md",
"docs/README_JP.md",
"docs/README_RU.md",
"docs/benchmarks.md",
"docs/fetching/choosing.md",
"pyproject.toml",
"scrapling/__init__.py",
"scrapling/core/_shell_... | [] | diff --git a/tests/fetchers/async/test_camoufox.py b/tests/fetchers/async/test_camoufox.py
index ffe6eacb..e8bbd3fe 100644
--- a/tests/fetchers/async/test_camoufox.py
+++ b/tests/fetchers/async/test_camoufox.py
@@ -70,7 +70,7 @@ async def scroll_page(page):
"os_randomize": True,
"disab... | true | |
D4Vinci/Scrapling | 108 | issue_to_patch | v0.3.9 | **A new update with many important changes**
## 🚀 New Stuff and quality of life changes
- Now the `impersonate` argument in `Fetcher` and `FetcherSession` can accept a list of browsers that the library will choose a random browser from them with each request.
- A new argument to the `clean` method in `TextHandler... | 573ec04b9b6f5d332b9d60a0abe2bb098a85a28e | 9602ad69864dbb9215e58489223a78010fa1b9d9 | diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index cd477fe9..b8eac744 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -5,10 +5,8 @@
## Proposed change
<!--
- Describe the big picture of your changes here to communicate to the
- maintainer... | [
".github/PULL_REQUEST_TEMPLATE.md",
".github/workflows/code-quality.yml",
".github/workflows/tests.yml",
".pre-commit-config.yaml",
"CONTRIBUTING.md",
"docs/README.md",
"docs/README_AR.md",
"docs/README_CN.md",
"docs/README_DE.md",
"docs/README_ES.md",
"docs/README_JP.md",
"docs/README_RU.md",... | [] | diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py
index 1f98bfb9..4a79c251 100644
--- a/tests/cli/test_cli.py
+++ b/tests/cli/test_cli.py
@@ -193,3 +193,51 @@ def test_invalid_arguments(self, runner, html_url):
[html_url, 'output.invalid']
)
# Should handle the error gracefully
+... | true | |
D4Vinci/Scrapling | 105 | issue_to_patch | In the "embedded" version of the turnstile, StealthyFetcher waits indefinitely.
### Have you searched if there an existing issue for this?
- [x] I have searched the existing issues
### Python version (python --version)
python 3.13
### Scrapling version (scrapling.__version__)
3.7
### Dependencies version (pip3 f... | v0.3.8 | **A new update with many important changes**
# 🚀 New Stuff and quality of life changes
- For all browser-based fetchers: websites that never finish loading their requests won't crash the code now if you used `network_idle` with them.
- The logic for collecting/checking for page content in browser-based fetchers h... | ba7015bc575cd44930ecc7d2a28b2e46fc11edf5 | 1e4d1e73a02a9f7fe3adb130d651471895c83c8a | diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml
index 62338f38..3c8ddcdc 100644
--- a/.github/workflows/docker-build.yml
+++ b/.github/workflows/docker-build.yml
@@ -13,8 +13,8 @@ on:
default: 'latest'
env:
- REGISTRY: docker.io
- IMAGE_NAME: pyd4vinci/scrapling
+ DOC... | [
".github/workflows/docker-build.yml",
"docs/fetching/dynamic.md",
"docs/tutorials/external.md",
"mkdocs.yml",
"pyproject.toml",
"scrapling/__init__.py",
"scrapling/engines/_browsers/_base.py",
"scrapling/engines/_browsers/_camoufox.py",
"scrapling/engines/_browsers/_config_tools.py",
"scrapling/en... | [] | true | |
D4Vinci/Scrapling | 99 | issue_to_patch | v0.3.7 | **A new update with many important changes**
# 🚀 New Stuff and quality of life changes
- Reworked `solve_cloudflare` argument in `StealthyFetcher` to make it able to solve all kinds of custom implementations of Turnstile.
- Refactored the entire codebase to be acceptable by Pyright, so expect a flawless IDE exper... | 458ad5b36a0891776fa0d1efc7cb9a55c170e561 | f9eff25e2429c05235dec9e525e80d1855ad0b23 | diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml
index bf2e5ffd..62338f38 100644
--- a/.github/workflows/docker-build.yml
+++ b/.github/workflows/docker-build.yml
@@ -1,8 +1,10 @@
name: Build and Push Docker Image
on:
- release:
- types: [published]
+ pull_request:
+ type... | [
".github/workflows/docker-build.yml",
".pre-commit-config.yaml",
"docs/fetching/dynamic.md",
"docs/fetching/stealthy.md",
"docs/parsing/main_classes.md",
"pyproject.toml",
"scrapling/__init__.py",
"scrapling/core/_types.py",
"scrapling/core/ai.py",
"scrapling/core/custom_types.py",
"scrapling/co... | [] | diff --git a/tests/fetchers/async/test_requests_session.py b/tests/fetchers/async/test_requests_session.py
index c9abc9cf..c4e13557 100644
--- a/tests/fetchers/async/test_requests_session.py
+++ b/tests/fetchers/async/test_requests_session.py
@@ -14,4 +14,3 @@ def test_async_fetcher_client_creation(self):
# Sh... | true | |
D4Vinci/Scrapling | 95 | issue_to_patch | v0.3.6 | # 🚀 New Stuff
- Improved the `solve_cloudflare` argument in `StealthyFetcher` and its session classes to be able to solve all types of both Turnstile and interstitial Cloudflare challenges 🎉
- Now the MCP server has the option to use `Streamable HTTP`, so you can easily expose the server.
- Added Docker support, ... | 38e7941b71e7090ecf2da641b7edf4296a835762 | a7e29a1662da46cf3dd1e33656728f8b24165098 | diff --git a/.bandit.yml b/.bandit.yml
index 1773bf5f..5acd3724 100644
--- a/.bandit.yml
+++ b/.bandit.yml
@@ -5,4 +5,5 @@ skips:
- B403 # We are using pickle for tests only
- B404 # Using subprocess library
- B602 # subprocess call with shell=True identified
-- B110 # Try, Except, Pass detected.
\ No newline at... | [
".bandit.yml",
".dockerignore",
".github/workflows/docker-build.yml",
"Dockerfile",
"README.md",
"docs/ai/mcp-server.md",
"docs/cli/extract-commands.md",
"docs/fetching/dynamic.md",
"docs/fetching/stealthy.md",
"docs/index.md",
"pyproject.toml",
"scrapling/__init__.py",
"scrapling/cli.py",
... | [] | diff --git a/tests/ai/test_ai_mcp.py b/tests/ai/test_ai_mcp.py
index d7f8b849..4a9e3085 100644
--- a/tests/ai/test_ai_mcp.py
+++ b/tests/ai/test_ai_mcp.py
@@ -1,6 +1,5 @@
import pytest
import pytest_httpbin
-from unittest.mock import Mock, patch
from scrapling.core.ai import ScraplingMCPServer, ResponseModel
@@ ... | true | |
D4Vinci/Scrapling | 89 | issue_to_patch | v0.3.5 | **Necessary release that fixes multiple issues**
# 🚀 New Stuff
- All browser-based fetchers (`DynamicFetcher`/`StealthyFetcher`/...) and their session classes are now fetching websites 15-20%:
1. Page management is now much faster due to the logic improvement by @AbdullahY36 in #87
2. Optimized the validatio... | 165dc524f82c733b1b0d4dcc214e1598e6fcba24 | 82b09620b28f743265430ba43c351244b2de40c2 | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 10a6740a..4a62cb1a 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -58,7 +58,7 @@ jobs:
- name: Install all browsers dependencies
run: |
python3 -m pip install --upgrade pip
- python3 -... | [
".github/workflows/tests.yml",
"README.md",
"docs/fetching/dynamic.md",
"pyproject.toml",
"scrapling/__init__.py",
"scrapling/cli.py",
"scrapling/core/custom_types.py",
"scrapling/core/shell.py",
"scrapling/engines/_browsers/_base.py",
"scrapling/engines/_browsers/_camoufox.py",
"scrapling/engin... | [] | diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py
index cae9fa07..1f98bfb9 100644
--- a/tests/cli/test_cli.py
+++ b/tests/cli/test_cli.py
@@ -14,6 +14,7 @@ def configure_selector_mock():
"""Helper function to create a properly configured Selector mock"""
mock_response = MagicMock(spec=Selector)
... | true | |
DaveGamble/cJSON | 1,006 | issue_to_patch | Fix: Type Confusion vulnerability in cJSONUtils_ApplyPatches | ### Description
This PR addresses a Type Confusion vulnerability found in `cJSON_Utils.c`.
### Root Cause
When processing certain JSON patches (e.g., `[{"op":"move","from":0,"path":"/obj/b"}]`), the code checks if the `from` node exists (`from == NULL`), but fails to validate if it is actually a string before ope... | b2890c8d76bbb64e710585ebc0a917196b9c67e7 | cd14a72963ebc1a77d387771104730beb5bb63ef | diff --git a/cJSON_Utils.c b/cJSON_Utils.c
index 8fa24f8e..8b38eb25 100644
--- a/cJSON_Utils.c
+++ b/cJSON_Utils.c
@@ -906,7 +906,7 @@ static int apply_patch(cJSON *object, const cJSON *patch, const cJSON_bool case_
if ((opcode == MOVE) || (opcode == COPY))
{
cJSON *from = get_object_item(patch, "fro... | [
"cJSON_Utils.c"
] | [] | true | ||
DaveGamble/cJSON | 991 | issue_to_patch | fix: prevent NULL pointer dereference in cJSON_SetNumberHelper | Add NULL check at the beginning of cJSON_SetNumberHelper to prevent segmentation fault when called with NULL object pointer. The function now returns NAN (Not-a-Number) when object is NULL, consistent with error handling patterns in other cJSON functions. | 5cc0e39f42dfe28cb8541f95fa2c513f0d550210 | 79e2ad0817261a01323572a46806fde6ee8441b7 | diff --git a/cJSON.c b/cJSON.c
index f16a7bcc..88c2d95b 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -410,6 +410,11 @@ static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_bu
/* don't ask me, but the original cJSON_SetNumberValue returns an integer or double */
CJSON_PUBLIC(double) cJSON_SetNumberHe... | [
"cJSON.c",
"tests/misc_tests.c"
] | [] | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 7c616479..fe2325e9 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <math.h>
#include "unity/examples/unity_config.h"
#include "unity/src/unity.h"
@@ -478,8 +4... | true | |
DaveGamble/cJSON | 990 | issue_to_patch | Outdated information in Readme
The README states that "CMake with an equal or higher version than 2.8.5 is supported" but the project now sets cmake_minimum_required(VERSION 3.5) in CMakeLists.txt. This mismatch can cause users with CMake versions >= 2.8.5 and < 3.5 to follow the README instructions and fail when runn... | docs: fix outdated CMake version requirement in README | The README stated that CMake 2.8.5+ was required, but CMakeLists.txt requires CMake 3.5+. This inconsistency caused confusion for users with CMake versions between 2.8.5 and 3.5.
Also updated library_config/uninstall.cmake to match for consistency.
Fixes #988 | 5cc0e39f42dfe28cb8541f95fa2c513f0d550210 | c319710ea2e98693b4f921e1ed6f6f6899ac5a93 | diff --git a/README.md b/README.md
index 99147afd..9c7ed142 100644
--- a/README.md
+++ b/README.md
@@ -89,7 +89,7 @@ cJSON is written in ANSI C (C89) in order to support as many platforms and compi
#### CMake
-With CMake, cJSON supports a full blown build system. This way you get the most features. CMake with an e... | [
"README.md",
"library_config/uninstall.cmake"
] | [] | true | |
DaveGamble/cJSON | 984 | issue_to_patch | Fix: add depth check to prevent stack overflow in cJSON_Print | ## Problem
Currently, `cJSON_Parse` enforces a depth limit (`CJSON_NESTING_LIMIT`) to prevent stack overflows during parsing. However, the `cJSON_Print` (and its internal `print_array` / `print_object` functions) does not check this limit.
If a cJSON structure is constructed with a depth exceeding the stack size (e... | c859b25da02955fef659d658b8f324b5cde87be3 | c5e788e2b258085c77de7c5f018339b763d3020f | diff --git a/cJSON.c b/cJSON.c
index 6e4fb0dd3..f16a7bccd 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -1598,6 +1598,11 @@ static cJSON_bool print_array(const cJSON * const item, printbuffer * const outp
return false;
}
+ if (output_buffer->depth >= CJSON_NESTING_LIMIT)
+ {
+ return false; /* nest... | [
"cJSON.c"
] | [] | true | ||
DaveGamble/cJSON | 986 | issue_to_patch | Upgrade version of cmake_minimum_required to 3.5 | c859b25da02955fef659d658b8f324b5cde87be3 | af113b480b90c9d34c063a047363307fbd2339ae | diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7ca27f0..59e4af5f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(cJSON
VERSION 1.7.19
| [
"CMakeLists.txt"
] | [] | true | |||
DaveGamble/cJSON | 939 | issue_to_patch | Allocate memory for the temporary buffer when paring numbers | Currently a temporary buffer with size of 64 is used when parsing numbers. Long numbers with length of 64 or more could not be correctly parsed, as CVE-2023-26819 described.
This PR allocate memory for the temporary buffer when paring numbers.
This also fixes CVE-2023-26819. | 12c4bf1986c288950a3d06da757109a6aa1ece38 | 8d0e830ee68eb006880fb5ee3b9bf712a6989612 | diff --git a/.github/workflows/ci-fuzz.yml b/.github/workflows/ci-fuzz.yml
index 36d89fbd..9e8be0bc 100644
--- a/.github/workflows/ci-fuzz.yml
+++ b/.github/workflows/ci-fuzz.yml
@@ -16,7 +16,7 @@ jobs:
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
- uses: actions/upload-artifact@v1
... | [
".github/workflows/ci-fuzz.yml",
"cJSON.c",
"tests/misc_tests.c",
"tests/parse_number.c"
] | [] | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index a96c2fdc..7c616479 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -782,6 +782,22 @@ static void cjson_set_bool_value_must_not_break_objects(void)
cJSON_Delete(sobj);
}
+static void cjson_parse_big_numbers_should_not_report_error(void)
+{
+ ... | true | |
DaveGamble/cJSON | 958 | issue_to_patch | Release 1.7.19 | 74e1ff4994aa4139126967f6d289b675b4b36fef | d39599c9256c1eacd32e288084a93e8fe0b60aae | diff --git a/CHANGELOG.md b/CHANGELOG.md
index de1d8e663..2f046e340 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+1.7.19 (Sep 9, 2025)
+======
+Fixes:
+------
+* Fix indentation (should use spaces), see #814
+* Fix spelling errors found by CodeSpell, see #841
+* Check for NULL in cJSON_DetachItemViaPoi... | [
"CHANGELOG.md",
"CMakeLists.txt",
"CONTRIBUTORS.md",
"Makefile",
"cJSON.c",
"cJSON.h"
] | [] | true | |||
DaveGamble/cJSON | 957 | issue_to_patch | fix the incorrect check in decode_array_index_from_pointer | this fixes CVE-2025-57052 | 8f2beb57ddad1f94bed899790b00f46df893ccac | ad55c0a6327da0d9cfcfbfbc76528ae9e872fe26 | diff --git a/cJSON_Utils.c b/cJSON_Utils.c
index 63651dfbb..8fa24f8e9 100644
--- a/cJSON_Utils.c
+++ b/cJSON_Utils.c
@@ -282,7 +282,7 @@ static cJSON_bool decode_array_index_from_pointer(const unsigned char * const po
return 0;
}
- for (position = 0; (pointer[position] >= '0') && (pointer[0] <= '9');... | [
"cJSON_Utils.c"
] | [] | true | ||
DaveGamble/cJSON | 852 | issue_to_patch | OOB access in `parse_string`
With the following fuzz target:
```
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "cJSON.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
cJSON *json = cJSON_ParseWithLength((char *)data, size);
if (json) {
cJSON_Del... | Fix heap buffer overflow | Fixes #800
Note that I have a kernel bug which makes ASan fail when address layout randomization is enabled. On top of that, CMake's CHECK_C_COMPILER_FLAG for some reason returns false on my machine for the address sanitizer (among others). So it's a bit of a bother testing this, but I did do so. I just had to forc... | 98f9eb0412067a852ec107c68e49180fe4e472dc | c39043866aaef2e599045b2c04936b247f84d82d | diff --git a/cJSON.c b/cJSON.c
index 4f5b38dc9..97564bb0a 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -1660,6 +1660,11 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_bu
current_item = new_item;
}
+ if (cannot_access_at_index(input_buffer, 1))
+ {
+ ... | [
"cJSON.c",
"tests/parse_examples.c"
] | [
{
"comment": "Maybe we can implement this with `cannot_access_at_index` to be more consistent with existing code styles?\r\n```\r\nif (cannot_access_at_index(input_buffer, 1))\r\n```",
"path": "cJSON.c",
"hunk": "@@ -1660,6 +1660,11 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * co... | diff --git a/tests/parse_examples.c b/tests/parse_examples.c
index 95a095903..d35d6cfb1 100644
--- a/tests/parse_examples.c
+++ b/tests/parse_examples.c
@@ -250,6 +250,33 @@ static void test14_should_not_be_parsed(void)
}
}
+/* Address Sanitizer */
+static void test15_should_not_heap_buffer_overflow(void)
+{
+ ... | true |
DaveGamble/cJSON | 852 | comment_to_fix | Fix heap buffer overflow | Maybe we can implement this with `cannot_access_at_index` to be more consistent with existing code styles?
```
if (cannot_access_at_index(input_buffer, 1))
``` | 98f9eb0412067a852ec107c68e49180fe4e472dc | c39043866aaef2e599045b2c04936b247f84d82d | diff --git a/cJSON.c b/cJSON.c
index 4f5b38dc9..97564bb0a 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -1660,6 +1660,11 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_bu
current_item = new_item;
}
+ if (cannot_access_at_index(input_buffer, 1))
+ {
+ ... | [
"cJSON.c"
] | [
{
"comment": "Maybe we can implement this with `cannot_access_at_index` to be more consistent with existing code styles?\r\n```\r\nif (cannot_access_at_index(input_buffer, 1))\r\n```",
"path": "cJSON.c",
"hunk": "@@ -1660,6 +1660,11 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * co... | true | ||
DaveGamble/cJSON | 888 | issue_to_patch | Fix #880 Max recursion depth for cJSON_Duplicate to prevent stack exhaustion | Dear maintainers,
Here is a suggestion of a fix to prevent the stack exhaustion in case of circular reference.
I duplicated the `cJSON_Duplicate` so that it could take a `depth` argument. This one is compared to `CJSON_CIRCULAR_LIMIT` which is currently set to `10'000` but likely need adaption based on your know... | 078c4e6c53f13dff15f0eaac1611abb6379e0206 | 45254798a63610837c2352e9c4ac93d4d09cc299 | diff --git a/cJSON.c b/cJSON.c
index cac1164b..f17a68dd 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -2726,7 +2726,14 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int co
}
/* Duplication */
+cJSON * cJSON_Duplicate_rec(const cJSON *item, size_t depth, cJSON_bool recurse);
+
CJSON_PUBLIC(cJ... | [
"cJSON.c",
"cJSON.h",
"tests/misc_tests.c"
] | [
{
"comment": "Looks the input `cJSON_bool recurse` is never used.",
"path": "cJSON.c",
"hunk": "@@ -2726,7 +2726,14 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int co\n }\n \n /* Duplication */\n+cJSON * cJSON_Duplicate_rec(const cJSON *item, size_t depth, cJSON_bool rec... | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index ba3e003e..4a0961da 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -219,6 +219,23 @@ static void cjson_should_not_parse_to_deeply_nested_jsons(void)
TEST_ASSERT_NULL_MESSAGE(cJSON_Parse(deep_json), "To deep JSONs should not be parsed.");
}
+... | true | |
DaveGamble/cJSON | 888 | comment_to_fix | Fix #880 Max recursion depth for cJSON_Duplicate to prevent stack exhaustion | Looks the input `cJSON_bool recurse` is never used. | 078c4e6c53f13dff15f0eaac1611abb6379e0206 | 45254798a63610837c2352e9c4ac93d4d09cc299 | diff --git a/cJSON.c b/cJSON.c
index cac1164b..f17a68dd 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -2726,7 +2726,14 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int co
}
/* Duplication */
+cJSON * cJSON_Duplicate_rec(const cJSON *item, size_t depth, cJSON_bool recurse);
+
CJSON_PUBLIC(cJ... | [
"cJSON.c"
] | [
{
"comment": "Looks the input `cJSON_bool recurse` is never used.",
"path": "cJSON.c",
"hunk": "@@ -2726,7 +2726,14 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int co\n }\n \n /* Duplication */\n+cJSON * cJSON_Duplicate_rec(const cJSON *item, size_t depth, cJSON_bool rec... | true | ||
DaveGamble/cJSON | 885 | issue_to_patch | no overlap control in cJSON_SetValuestring
I discovered that the function `cJSON_SetValuestring` does not perform any control for string overlapping.
The problem is [here](https://github.com/DaveGamble/cJSON/blob/424ce4ce9668f288fb4ab665775546d3ed709e96/cJSON.c#L416) :
```C
if (strlen(valuestring) <= strlen(object-... | Fix #881, check overlap before calling strcpy in cJSON_SetValuestring | Add a check to be sure that the string don't overlap to avoid issues with `strcpy`.
Fixes #881
All the credit goes to @tregua87 | 424ce4ce9668f288fb4ab665775546d3ed709e96 | 3f09bd65f8cedece458de3bbfbd3894d24b4c3fb | diff --git a/cJSON.c b/cJSON.c
index cac1164b8..27402d1f4 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -403,6 +403,8 @@ CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number)
CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring)
{
char *copy = NULL;
+ size_t v1_len;
+ ... | [
"cJSON.c",
"tests/misc_tests.c"
] | [] | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index ba3e003e5..c558ac0dd 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -456,6 +456,24 @@ static void cjson_functions_should_not_crash_with_null_pointers(void)
cJSON_Delete(item);
}
+static void cjson_set_valuestring_should_return_null_if_strin... | true |
DaveGamble/cJSON | 886 | issue_to_patch | Check for NULL in cJSON_DetachItemViaPointer, fixes #882 | I added two NULL check to avoid NULL dereferences in cJSON_DetachItemViaPointer as discussed in #882.
Once again, all credit goes to @tregua87 | 424ce4ce9668f288fb4ab665775546d3ed709e96 | 81b36279faf0143f99150974fca7cfc534e1798b | diff --git a/cJSON.c b/cJSON.c
index cac1164b8..fe22bd83c 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -2204,7 +2204,7 @@ CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * c
CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
{
- if ((parent == NULL) || (item... | [
"cJSON.c",
"tests/misc_tests.c"
] | [
{
"comment": "`item->prev` may be NULL when `item == parent->child` here.",
"path": "cJSON.c",
"hunk": "@@ -2204,7 +2204,7 @@ CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * c\n \n CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)\n {\n- ... | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index ba3e003e5..b9c59e71a 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -280,6 +280,21 @@ static void cjson_detach_item_via_pointer_should_detach_items(void)
TEST_ASSERT_NULL_MESSAGE(parent->child, "Child of the parent wasn't set to NULL.");
}
... | true | |
DaveGamble/cJSON | 886 | comment_to_fix | Check for NULL in cJSON_DetachItemViaPointer, fixes #882 | `item->prev` may be NULL when `item == parent->child` here. | 424ce4ce9668f288fb4ab665775546d3ed709e96 | 81b36279faf0143f99150974fca7cfc534e1798b | diff --git a/cJSON.c b/cJSON.c
index cac1164b8..fe22bd83c 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -2204,7 +2204,7 @@ CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * c
CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
{
- if ((parent == NULL) || (item... | [
"cJSON.c"
] | [
{
"comment": "`item->prev` may be NULL when `item == parent->child` here.",
"path": "cJSON.c",
"hunk": "@@ -2204,7 +2204,7 @@ CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * c\n \n CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)\n {\n- ... | true | ||
DaveGamble/cJSON | 866 | issue_to_patch | Revert "feat: add tests for #842" to fix test failures | This reverts commit 5b502cdbfb21fbe5f6cf9ffbd2b96e4281a741e6.
Related to #860 | 324973008ced4ea03d1626a00915d0399ecbd9db | a6206aec56fc9bd105e6e7ef32255d1e066394b7 | [
"tests/CMakeLists.txt",
"tests/misc_tests.c"
] | [] | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9e8962f61..c7592213b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -62,7 +62,6 @@ if(ENABLE_CJSON_TEST)
option(ENABLE_VALGRIND OFF "Enable the valgrind memory checker for the tests.")
if (ENABLE_VALGRIND)
- add_compile_d... | true | ||
DaveGamble/cJSON | 841 | issue_to_patch | Fix spelling errors found by CodeSpell. | This PR fixes a handful of typos and misspellings found by the CodeSpell utility, which lives at https://github.com/codepell-project/codespell
Other than a single corrected test failure output string, there are no functional changes. | 87d8f0961a01bf09bef98ff89bae9fdec42181ee | 3954a4bf9d69aa0ce01288e62426428e6c93c321 | [
"tests/cjson_add.c",
"tests/print_object.c",
"tests/unity/auto/parse_output.rb",
"tests/unity/docs/UnityGettingStartedGuide.md",
"tests/unity/extras/eclipse/error_parsers.txt",
"tests/unity/src/unity.c",
"tests/unity/test/rakefile"
] | [] | diff --git a/tests/cjson_add.c b/tests/cjson_add.c
index b02f1e275..ac96ce75d 100644
--- a/tests/cjson_add.c
+++ b/tests/cjson_add.c
@@ -34,7 +34,7 @@ static void * CJSON_CDECL failing_malloc(size_t size)
return NULL;
}
-/* work around MSVC error C2322: '...' address of dillimport '...' is not static */
+/* wor... | true | ||
DaveGamble/cJSON | 814 | issue_to_patch | Fix indentation (should use spaces) | This was "broken" almost two years ago: https://github.com/DaveGamble/cJSON/commit/d321fa9e6e574ff93518f6384865b9af0a4a4afc
I just noticed it when updating cJSON 1.7.15 -> 1.7.17 in our project here and saw the indentation is off (we use the default GNU tabsize of 8):
number_buffer, "null");
}
- else if(d == (double)item->valueint)
- {
- length ... | [
"cJSON.c"
] | [] | true | ||
DaveGamble/cJSON | 857 | issue_to_patch | Release 1.7.18 | 5b502cdbfb21fbe5f6cf9ffbd2b96e4281a741e6 | 5b623ab5b1ce5e7a57a2d12f3aedd513358f0834 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51261ab5..de1d8e66 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+1.7.18 (May 13, 2024)
+======
+Fixes:
+------
+* Add NULL check to cJSON_SetValuestring()(CVE-2024-31755), see #839 and #840
+* Remove non-functional list handling of compiler flags, see #851... | [
"CHANGELOG.md",
"CMakeLists.txt",
"CONTRIBUTORS.md",
"Makefile",
"cJSON.c",
"cJSON.h"
] | [] | true | |||
DaveGamble/cJSON | 855 | issue_to_patch | Set deallocated pointer null | Merge #842 to branch master and add some tests.
Related to #833 | a20be7996dbb05631fbc98ab48fa6be31fe5c275 | 7280422b40714573a36dc3e5086fe53b15770f19 | diff --git a/cJSON.c b/cJSON.c
index 97564bb0a..6f55820fb 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -263,10 +263,12 @@ CJSON_PUBLIC(void) cJSON_Delete(cJSON *item)
if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL))
{
global_hooks.deallocate(item->valuestring);
+ ... | [
"cJSON.c",
"tests/CMakeLists.txt",
"tests/misc_tests.c"
] | [] | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c7592213b..9e8962f61 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -62,6 +62,7 @@ if(ENABLE_CJSON_TEST)
option(ENABLE_VALGRIND OFF "Enable the valgrind memory checker for the tests.")
if (ENABLE_VALGRIND)
+ add_compile_d... | true | |
DaveGamble/cJSON | 842 | issue_to_patch | Set deallocated pointers to NULL whenever they are not reassigned immediately after | Fixes DaveGamble/cJSON#833 | 5437b7908651c6b0828a82b21b4baf98846c0d01 | 49cc07a400824d7f9af9a4244f14b9d9f1036f62 | diff --git a/cJSON.c b/cJSON.c
index 9bc8961ee..727e1827c 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -235,10 +235,12 @@ CJSON_PUBLIC(void) cJSON_Delete(cJSON *item)
if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL))
{
global_hooks.deallocate(item->valuestring);
+ ... | [
"cJSON.c"
] | [] | true | ||
DaveGamble/cJSON | 854 | issue_to_patch | Remove misused optimization flag -01 | related to #850 | 3ef4e4e730e5efd381be612df41e1ff3f5bb3c32 | 014b77e3ddaf611b0ebc7e0e7190c1c1b130cc35 | diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50fc38856..1f2043755 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,7 +70,6 @@ if (ENABLE_SANITIZERS)
-fsanitize=float-cast-overflow
-fsanitize-address-use-after-scope
-fsanitize=integer
- -01
-fno-sanitize-recover
... | [
"CMakeLists.txt"
] | [] | true | ||
DaveGamble/cJSON | 851 | issue_to_patch | Remove non-functional list handling of compiler flags | The list append operation is a no-op. The line right below it is already doing the intended work. | 19396a49a60a1937bc8cbf30ab5579f089ee2f0f | dca46e407d528e36469338e0784489ee4aab6a5e | diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d807ea6..50fc3885 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -102,13 +102,10 @@ foreach(compiler_flag ${custom_compiler_flags})
CHECK_C_COMPILER_FLAG(${compiler_flag} "FLAG_SUPPORTED_${current_variable}")
if (FLAG_SUPPORTED_${current_variable})
- ... | [
"CMakeLists.txt"
] | [] | true | ||
DaveGamble/cJSON | 849 | issue_to_patch | update comments and add tests for cJSON_SetValuestring | 5671646e9779ef8fa35990a5084e7e472e024862 | 18d1749e26eb1abe803bf49f383e72faec02da93 | diff --git a/cJSON.c b/cJSON.c
index 8903e4c2a..4f5b38dc9 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -397,6 +397,7 @@ CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number)
return object->valuedouble = number;
}
+/* Note: when passing a NULL valuestring, cJSON_SetValuestring treats this as an error... | [
"cJSON.c",
"tests/misc_tests.c"
] | [] | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 48fb6ec20..ba3e003e5 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -444,6 +444,7 @@ static void cjson_functions_should_not_crash_with_null_pointers(void)
TEST_ASSERT_FALSE(cJSON_Compare(NULL, item, false));
TEST_ASSERT_NULL(cJSON_SetValu... | true | ||
DaveGamble/cJSON | 847 | issue_to_patch | fix: fix incorrect name in security.md | Related to #845 | 66e9dff670a953586d4e75296f021a1c40f66768 | f8b407edc543fa417561283f365756f5eeeff25f | diff --git a/SECURITY.md b/SECURITY.md
index 6113832e..33d99a2e 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -2,10 +2,10 @@
## Supported Versions
-Security is of the highest importance and all security vulnerabilities or suspected security vulnerabilities should be reported to mavonEditor team privately, to minim... | [
"SECURITY.md"
] | [] | true | ||
DaveGamble/cJSON | 840 | issue_to_patch | A segmentation fault in cJSON_SetValuestring
Hi,
when fuzzing cJSON library, I found a segmentation fault happened in `cJSON_SetValuestring`.
If the valuestring passed to `cJSON_SetValuestring` is `NULL`, a null pointer dereference will happen in the following statements:
```C
CJSON_PUBLIC(char*) cJSON_SetVa... | Add NULL check to cJSON_SetValuestring() | If the valuestring passed to cJSON_SetValuestring is NULL, a null pointer dereference will happen.
This commit adds the NULL check of valuestring before it is dereferenced.
fixes: #839 | 87d8f0961a01bf09bef98ff89bae9fdec42181ee | 9e1e202033c7701bb3247dd5e61c0e84124454a8 | diff --git a/cJSON.c b/cJSON.c
index 4e4979e99..8903e4c2a 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -406,7 +406,7 @@ CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring)
return NULL;
}
/* return NULL if the object is corrupted */
- if (object->valuestring == NULL)
+ if (... | [
"cJSON.c"
] | [] | true | |
DaveGamble/cJSON | 813 | issue_to_patch | Release 1.7.17 | update version to 1.7.17 | f66cbab4bfb3926ffd4c5e13f9fb6d506ee0241d | 6551a3c3fb1e944bdb4f16d2058646014426ce84 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 85fa40cc..51261ab5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+1.7.17 (Dec 26, 2023)
+======
+Fixes:
+------
+* Fix null reference in cJSON_SetValuestring(CVE-2023-50472), see #809
+* Fix null reference in cJSON_InsertItemInArray(CVE-2023-50471), see #80... | [
"CHANGELOG.md",
"CMakeLists.txt",
"Makefile",
"cJSON.c",
"cJSON.h"
] | [] | true | ||
DaveGamble/cJSON | 810 | issue_to_patch | bug for cJSON_InsertItemInArray function
### Description
If the the newitem passed in cJSON_InsertItemInArray dont have `prev`, the `newitem->prev`will be null. The null pointer dereference will cause SEGV in function cJSON_InsertItemInArray cJSON.c:2287
### Version
```
commit cb8693b058ba302f4829ec6d03f609a... | fix error in null checkings | fixes #802 and #803 | 60ff122ef5862d04b39b150541459e7f5e35add8 | 0140c487bfa36d1fc9e6751e84ecebb6494db6f6 | diff --git a/cJSON.c b/cJSON.c
index faa3e2974..8411d9477 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -2280,7 +2280,7 @@ CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON
return add_item_to_array(array, newitem);
}
- if (after_inserted != array->child && newitem->prev == NULL)... | [
"cJSON.c"
] | [] | true | |
DaveGamble/cJSON | 809 | issue_to_patch | add NULL checkings | Add NULL checkings in cJSON_InsertItemInArray and cJSON_SetValuestring
Fixing #802(CVE-2023-50471) and #803(CVE-2023-50472) | cb8693b058ba302f4829ec6d03f609ac6f848546 | 280982222ef40cd79ff6ffdcf7499a59f66d5dfc | diff --git a/cJSON.c b/cJSON.c
index f6dd11c5f..faa3e2974 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -401,7 +401,12 @@ CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring)
{
char *copy = NULL;
/* if object's type is not cJSON_String or is cJSON_IsReference, it should not set valuestrin... | [
"cJSON.c",
"tests/misc_tests.c"
] | [] | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 19b7c8533..48fb6ec20 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -352,6 +352,19 @@ static void cjson_functions_should_not_crash_with_null_pointers(void)
{
char buffer[10];
cJSON *item = cJSON_CreateString("item");
+ cJSON *array = ... | true | |
DaveGamble/cJSON | 770 | issue_to_patch | Release 1.7.16 | 545710e3bfff09f875222b003de9044699769301 | 096514800f6e5eb26cac738529ca1cad7d224907 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef5325dea..85fa40cce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,22 @@
+1.7.16 (Jul 5, 2023)
+======
+Features:
+------
+* Add an option for ENABLE_CJSON_VERSION_SO in CMakeLists.txt, see #534
+* Add cmake_policy to CMakeLists.txt, see #163
+* Add cJSON_SetBool... | [
"CHANGELOG.md",
"CMakeLists.txt",
"CONTRIBUTORS.md",
"Makefile",
"cJSON.c",
"cJSON.h"
] | [] | true | |||
DaveGamble/cJSON | 768 | issue_to_patch | upgrade clang to fix actions error | Actions builds are failing because clang-8 is failing to be installed. Upgrade clang-8 to clang-14 to fix this. | 543c28869e4b215522635b7270b4b7cbb43030af | 6e2fb33af7045a8e9ac5c7b5b286c2bf771bdc70 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index dc9d17c60..b06ab11da 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -31,7 +31,7 @@ jobs:
- name: install build dependencies
run: |
sudo apt-get update
- sudo apt-get install clang-8 valgrind
+ ... | [
".github/workflows/CI.yml"
] | [] | true | ||
DaveGamble/cJSON | 761 | issue_to_patch | how to compile with meson
at least from my looking at the documentation I was unable to find anything related to meson, but just doing it the simple way doesn't work:
```meson
project('cjson-example','c')
c_args = [ '-std=c99', '-Wall', '-Wextra', '-pedantic', '-Werror' ]
executable('test','test.c', c_args... | Add meson documentation | The following changes to the README file add documentation, how to use cJSON in a meson project. This would resolve #760. | b45f48e600671feade0b6bd65d1c69de7899f2be | c087f5c764f314615357613bb9d7f41b5c116a4a | diff --git a/README.md b/README.md
index ebd32c4b9..99147afdb 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@ Ultralightweight JSON parser in ANSI C.
* [Copying the source](#copying-the-source)
* [CMake](#cmake)
* [Makefile](#makefile)
+ * [Meson](#meson)
* [Vcpkg](#Vcpkg)
* [Includin... | [
"README.md"
] | [] | true | |
DaveGamble/cJSON | 726 | issue_to_patch | A null pointer crash in cJSON_ReplaceItemViaPointer
Hi,
when fuzzing cJSON, we found a null pointer crash happened in `cJSON_ReplaceItemViaPointer`.
If the `parent` passed in `cJSON_ReplaceItemViaPointer` has not a child, which means `parent->child` is null, a null pointer dereference crash will be happened at ... | Fix a null pointer crash in cJSON_ReplaceItemViaPointer | If the parent passed in cJSON_ReplaceItemViaPointer has not a child, which means parent->child is null, a null pointer dereference crash will be happened inside cJSON_ReplaceItemViaPointer.
This commit adds the NULL check of `parent->child` beforehand to inform user such incorrect usage.
fixes: #725
Signed-off... | b45f48e600671feade0b6bd65d1c69de7899f2be | 13ba24fe55873e2e74adbb90f2813748542dfecd | diff --git a/cJSON.c b/cJSON.c
index 524ba4641..d7aeecd9e 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -2291,7 +2291,7 @@ CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement)
{
- ... | [
"cJSON.c"
] | [] | true | |
DaveGamble/cJSON | 344 | issue_to_patch | Release 1.7.11 | c69134d01746dcf551dd7724b4edb12f922eb0d1 | 6b249213dd1bfdb0f2791eec20c65aa4bb4ce301 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8debcdf3..cf091f05 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+1.7.11
+======
+Fixes:
+------
+* Fix a bug where cJSON_Minify could overflow it's buffer, both reading and writing. This is a security issue. (see #338). Big thanks @bigric3 for reporting.
+... | [
"CHANGELOG.md",
"CMakeLists.txt",
"Makefile",
"cJSON.c",
"cJSON.h",
"tests/CMakeLists.txt",
"tests/minify_tests.c"
] | [] | diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 6f1688db..fecc9a9c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -57,6 +57,7 @@ if(ENABLE_CJSON_TEST)
compare_tests
cjson_add
readme_examples
+ minify_tests
)
option(ENABLE_VALGRIND OFF "Enable... | true | ||
DaveGamble/cJSON | 675 | issue_to_patch | cJSON.c: add allocate check for replace_item_in_object | Signed-off-by: Junbo Zheng <3273070@qq.com> | a6424b85dde200a87cac26451c6f0a6f3426681f | 3de70768ae6164924bb27ecab59de6cbf0fcfd92 | diff --git a/cJSON.c b/cJSON.c
index c78aac660..524ba4641 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -96,9 +96,9 @@ CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void)
return (const char*) (global_error.json + global_error.position);
}
-CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item)
+CJSON_PUBLI... | [
"cJSON.c"
] | [] | true | ||
DaveGamble/cJSON | 639 | issue_to_patch | cJSON_SetBoolValue plus test | as requested in issue #329 | 203a0dec6ff06e3842fa23a1bc9825aecf56b381 | 674ab26d3eacb4a3072f17283463b8e401b59b75 | diff --git a/cJSON.h b/cJSON.h
index 92907a2cd..95a9cf69d 100644
--- a/cJSON.h
+++ b/cJSON.h
@@ -279,6 +279,13 @@ CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number);
/* Change the valuestring of a cJSON_String object, only takes effect when type of object is cJSON_String */
CJSON_PUBLIC(char*) c... | [
"cJSON.h",
"tests/misc_tests.c"
] | [
{
"comment": "```suggestion\r\n cJSON_Delete(oobj);\r\n cJSON_Delete(bobj);\r\n```",
"path": "tests/misc_tests.c",
"hunk": "@@ -650,6 +650,63 @@ static void cjson_set_valuestring_to_object_should_not_leak_memory(void)\n cJSON_Delete(root);\n }\n \n+static void cjson_set_bool_value_must_not_bre... | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 3bf0a1cc1..19b7c8533 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -28,7 +28,6 @@
#include "unity/src/unity.h"
#include "common.h"
-
static void cjson_array_foreach_should_loop_over_arrays(void)
{
cJSON array[1];
@@ -77,7 +76,6 @@ stati... | true | |
DaveGamble/cJSON | 639 | comment_to_fix | cJSON_SetBoolValue plus test | ```suggestion
cJSON_Delete(oobj);
cJSON_Delete(bobj);
``` | 203a0dec6ff06e3842fa23a1bc9825aecf56b381 | 674ab26d3eacb4a3072f17283463b8e401b59b75 | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 3bf0a1cc1..19b7c8533 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -28,7 +28,6 @@
#include "unity/src/unity.h"
#include "common.h"
-
static void cjson_array_foreach_should_loop_over_arrays(void)
{
cJSON array[1];
@@ -77,7 +76,6 @@ stati... | [
"tests/misc_tests.c"
] | [
{
"comment": "```suggestion\r\n cJSON_Delete(oobj);\r\n cJSON_Delete(bobj);\r\n```",
"path": "tests/misc_tests.c",
"hunk": "@@ -650,6 +650,63 @@ static void cjson_set_valuestring_to_object_should_not_leak_memory(void)\n cJSON_Delete(root);\n }\n \n+static void cjson_set_bool_value_must_not_bre... | true | ||
DaveGamble/cJSON | 664 | issue_to_patch | Fix README typo | PR-ing this on `master` having looked at the contributing guidelines, let me know if that is not right! | 2fc55f6793ff6a427e795cf3b8a68a534afb78a2 | f1494a85204a09d39492440d63b358f4bdf51bd4 | diff --git a/README.md b/README.md
index 0ea89da57..ebd32c4b9 100644
--- a/README.md
+++ b/README.md
@@ -407,7 +407,7 @@ end:
}
```
-Alternatively we can use the `cJSON_Add...ToObject` helper functions to make our lifes a little easier:
+Alternatively we can use the `cJSON_Add...ToObject` helper functions to make o... | [
"README.md"
] | [
{
"comment": "since v1.7.14, the struct of json array has changed, the first element does have `prev.next == NULL`, please see https://github.com/DaveGamble/cJSON/releases/tag/v1.7.14",
"path": "README.md",
"hunk": "@@ -198,7 +198,7 @@ The type can be one of the following:\n * `cJSON_NULL` (check with `... | true | ||
DaveGamble/cJSON | 664 | comment_to_fix | Fix README typo | since v1.7.14, the struct of json array has changed, the first element does have `prev.next == NULL`, please see https://github.com/DaveGamble/cJSON/releases/tag/v1.7.14 | 2fc55f6793ff6a427e795cf3b8a68a534afb78a2 | f1494a85204a09d39492440d63b358f4bdf51bd4 | diff --git a/README.md b/README.md
index 0ea89da57..ebd32c4b9 100644
--- a/README.md
+++ b/README.md
@@ -407,7 +407,7 @@ end:
}
```
-Alternatively we can use the `cJSON_Add...ToObject` helper functions to make our lifes a little easier:
+Alternatively we can use the `cJSON_Add...ToObject` helper functions to make o... | [
"README.md"
] | [
{
"comment": "since v1.7.14, the struct of json array has changed, the first element does have `prev.next == NULL`, please see https://github.com/DaveGamble/cJSON/releases/tag/v1.7.14",
"path": "README.md",
"hunk": "@@ -198,7 +198,7 @@ The type can be one of the following:\n * `cJSON_NULL` (check with `... | true | ||
DaveGamble/cJSON | 437 | issue_to_patch | CIFuzz integration | [CIFuzz](https://google.github.io/oss-fuzz/getting-started/continuous-integration/) will run the fuzz target (`cjson_read_fuzzer.c`) each time a pull request is submitted to detect bugs before they make it into the codebase.
It runs for about 10 minutes and produces a test case if it finds a bug, the bug can be repr... | fa28d82f2e9fcb975ce9977c958afcbc34adf137 | c0e416e781ca39fbeab68bbb2b5ffb778816062a | diff --git a/.github/workflows/ci-fuzz.yml b/.github/workflows/ci-fuzz.yml
new file mode 100644
index 000000000..36d89fbd6
--- /dev/null
+++ b/.github/workflows/ci-fuzz.yml
@@ -0,0 +1,23 @@
+name: CIFuzz
+on: [pull_request]
+jobs:
+ Fuzzing:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Build Fuzzers
+ use... | [
".github/workflows/ci-fuzz.yml"
] | [] | true | ||
DaveGamble/cJSON | 628 | issue_to_patch | Ignore all .dylib files | This fixes some .dylib files being flagged as added when compiled e.g. `libcjson.dylib.1.7.14` | 203a0dec6ff06e3842fa23a1bc9825aecf56b381 | 2b521aef50b22e91c1e122ded6f56f200544a9ac | diff --git a/.gitignore b/.gitignore
index b3c8d6b47..65fa89b60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,7 @@ test
*.swp
*.patch
tags
-*.dylib
+*.dylib*
build/
cJSON_test
cJSON_test_utils
| [
".gitignore"
] | [] | true | ||
DaveGamble/cJSON | 625 | issue_to_patch | Update CMakeLists.txt | fix the bug:when build with cmake using option '-DBUILD_SHARED_AND_STATIC_LIBS=ON', build sucess,
but use cmake comand 'find_package(cjson CONFIG)', 'cjson' target is available,but 'cjson-static' target not exist. | 203a0dec6ff06e3842fa23a1bc9825aecf56b381 | af1c3d7b66aa4b54a0e11b487e7c5c05e6072bc0 | diff --git a/CMakeLists.txt b/CMakeLists.txt
index c26acbef..b60f2e4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -155,7 +155,11 @@ install(TARGETS "${CJSON_LIB}"
INCLUDES DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}"
)
if (BUILD_SHARED_AND_STATIC_LIBS)
- install(TARGETS "${CJSON_LIB}-static" DESTINA... | [
"CMakeLists.txt"
] | [] | true | ||
DaveGamble/cJSON | 534 | issue_to_patch | In some cases, CJSON_VERSION_SO is not needed. An option is needed for the cJSON so name
In some cases, CJSON_VERSION_SO is not needed. An option is needed for the cJSON so name.
I have submitted a pull request #534
Can this PR be merged into master? @DaveGamble | add an option for ENABLE_CJSON_VERSION_SO in CMakeLists.txt | In some cases, CJSON_VERSION_SO is not needed.
An option is added for ENABLE_CJSON_VERSION_SO in CMakeLists.txt. | 4100379a04f2f2838ffb00c4ad3d0dd9e49f4147 | 9cf09589a94e70cdb9f73bbe9dedc994b9cd3cd7 | diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8c963429..fdc233ab9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,6 +122,7 @@ set(SOURCES cJSON.c)
option(BUILD_SHARED_AND_STATIC_LIBS "Build both shared and static libraries" Off)
option(CJSON_OVERRIDE_BUILD_SHARED_LIBS "Override BUILD_SHARED_LIBS with C... | [
"CMakeLists.txt",
"README.md"
] | [] | true | |
DaveGamble/cJSON | 630 | issue_to_patch | print int without decimal places | Print int without decimal places | 203a0dec6ff06e3842fa23a1bc9825aecf56b381 | bbf11ba5bfb586d4b9dd0e106d1615ba45488976 | diff --git a/cJSON.c b/cJSON.c
index 3063f74e9..c78aac660 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -562,6 +562,10 @@ static cJSON_bool print_number(const cJSON * const item, printbuffer * const out
{
length = sprintf((char*)number_buffer, "null");
}
+ else if(d == (double)item->valueint)
+ {
+ length =... | [
"cJSON.c"
] | [] | true | ||
DaveGamble/cJSON | 623 | issue_to_patch | Ignore *.lst/*.lss files in .gitignore
Some compilers can generate .lst/.lss files containing source/compilation info.
Would it be possible to get *.lst and *.lss added to the .gitignore file as these shouldn't be pushed to the repository and when I build my project cJSON git sees the change and prevents me pulling... | chore: ignore *.lst/*.lss file | fix #614 | c77a68892761a1f4b1d5aadec72434615fcd1d85 | a67e86ecca41c327d7907198b1205911f71245df | diff --git a/.gitignore b/.gitignore
index 58edf92c..b3c8d6b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,5 @@ libcjson_utils.so.*
.vscode
.idea
cmake-build-debug
+*.lst
+*.lss
| [
".gitignore"
] | [] | true | |
DaveGamble/cJSON | 451 | issue_to_patch | add new function of `cJSON_SetValuestring` | ## Changes
- currently if we want to change a JSON item's `valuestring`, we have to free the old value carefully, to make sure people could easily change it, `cJSON_SetValuestring` has been added.
- new feature for #450 | 3ece4c893c123aa3d77f90d580cf6b0a4b3a2ad5 | 31c7880fab5722a6fef47589c5064f7445d39f1d | diff --git a/README.md b/README.md
index 55aba581a..5480b8e3e 100644
--- a/README.md
+++ b/README.md
@@ -197,21 +197,22 @@ The type can be one of the following:
* `cJSON_NULL` (check with `cJSON_IsNull`): Represents a `null` value.
* `cJSON_Number` (check with `cJSON_IsNumber`): Represents a number value. The value i... | [
"README.md",
"cJSON.c",
"cJSON.h",
"tests/misc_tests.c"
] | [
{
"comment": "Repeated check in a single thread",
"path": "cJSON.c",
"hunk": "@@ -368,6 +368,31 @@ CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number)\n return object->valuedouble = number;\n }\n \n+CJSON_PUBLIC(char*) cJSON_SetValuestringToObject(cJSON *object, const char *valu... | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 20a5ddd6a..2538e8d58 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -550,19 +550,20 @@ static void cjson_add_item_to_object_should_not_use_after_free_when_string_is_al
cJSON_Delete(object);
}
-static void cjson_delete_item_from_array_should... | true | |
DaveGamble/cJSON | 453 | issue_to_patch | add return value for cJSON_AddItemTo... | ## Changes:
- add return value for function `cJSON_AddItemTo...`, so we can check if the item has been added successfully
- an `cJSON_Object` or `cJSON_Array` is not allowed to add to itself | 3ece4c893c123aa3d77f90d580cf6b0a4b3a2ad5 | af56a146fda8167ed8fe04608fe2b7dec7edcb2f | diff --git a/cJSON.c b/cJSON.c
index b0e744e4..39b00697 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -1865,7 +1865,7 @@ static cJSON_bool add_item_to_array(cJSON *array, cJSON *item)
{
cJSON *child = NULL;
- if ((item == NULL) || (array == NULL))
+ if ((item == NULL) || (array == NULL) || (array == item))
{... | [
"cJSON.c",
"cJSON.h",
"tests/misc_tests.c"
] | [] | diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 20a5ddd6..714c44db 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -332,13 +332,15 @@ static void cjson_replace_item_in_object_should_preserve_name(void)
cJSON root[1] = {{ NULL, NULL, NULL, 0, NULL, 0, 0, NULL }};
cJSON *child = NULL;
... | true | |
DaveGamble/cJSON | 454 | issue_to_patch | comparing double value with DBL_EPSILON | ## Changes:
- using fabs(a - b) < DBL_MIN to compare float number
- define isnan and isinf for ANSI C(c89), if not compiling in c89, we could include them from `math.h` directly | 3ece4c893c123aa3d77f90d580cf6b0a4b3a2ad5 | 4e114c1f3132e1a4db46ab8e8c6aa33ecde3def8 | diff --git a/Makefile b/Makefile
index 08fcc22e..0e58d5ce 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,7 @@ else
endif
PIC_FLAGS = -fPIC
-R_CFLAGS = $(PIC_FLAGS) -pedantic -Wall -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wc... | [
"Makefile",
"cJSON.c",
"cJSON.h",
"cJSON_Utils.c",
"tests/compare_tests.c"
] | [] | diff --git a/tests/compare_tests.c b/tests/compare_tests.c
index 307d0e82..797c7740 100644
--- a/tests/compare_tests.c
+++ b/tests/compare_tests.c
@@ -64,6 +64,9 @@ static void cjson_compare_should_compare_numbers(void)
TEST_ASSERT_TRUE(compare_from_string("1", "1", false));
TEST_ASSERT_TRUE(compare_from_stri... | true | |
DaveGamble/cJSON | 472 | issue_to_patch | array's item should be in the list | ## Changes:
* Since the prev of the head node now points to the tail node(#448, #456 ), the child of array should be in the list. | a82449fa3e83e0ddb7d27d870cbe830aec35e6a6 | 1fc755ac0964cd56d9a2564967dc4747be223f23 | [
"tests/parse_array.c"
] | [] | diff --git a/tests/parse_array.c b/tests/parse_array.c
index dfaae29be..d013f2247 100644
--- a/tests/parse_array.c
+++ b/tests/parse_array.c
@@ -90,7 +90,8 @@ static void parse_array_should_parse_arrays_with_one_element(void)
assert_parse_array("[[]]");
assert_has_child(item);
- assert_is_array(item->chi... | true | ||
DaveGamble/cJSON | 501 | issue_to_patch | add github actions CI | add github actions CI for this repo. | 3fb9d929e1b49a83ee81aa425a4635c35aea94a7 | 857c037ccce67ca58da196f1dd46d3d4a21f6474 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
new file mode 100644
index 000000000..dc9d17c60
--- /dev/null
+++ b/.github/workflows/CI.yml
@@ -0,0 +1,102 @@
+name: CI
+
+on:
+ push:
+ branches: [ master ]
+ paths-ignore:
+ - '**.md'
+ - 'LICENSE'
+ pull_request:
+ types: [opened,... | [
".github/workflows/CI.yml"
] | [] | true | ||
DaveGamble/cJSON | 502 | issue_to_patch | remove float-divide-by-zero for supporting NAN | 60c3b0a5715bc2a7d9d6d614d95fc57b5e6eaed2 | 23f027139e5f0da860b41e6b8eb3045ba08335e8 | diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a73a2c27..4c3694046 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,7 +68,6 @@ if (ENABLE_SANITIZERS)
-fno-omit-frame-pointer
-fsanitize=address
-fsanitize=undefined
- -fsanitize=float-divide-by-zero
-fsanitize=float-... | [
"CMakeLists.txt"
] | [] | true | |||
DaveGamble/cJSON | 503 | issue_to_patch | optimize the way to find tail node | ## Changes:
- fix issue #496, remove the dead code
- optimize some head and tail node operation since the `node->prev` has changed to point to `tail node` | 0b13220419662d2d426ede6b75da4ae6c676269c | c8ca78a3cc2045f3714f04dab7152a67215bca80 | diff --git a/cJSON.c b/cJSON.c
index 7518389b5..0acf487d0 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -1975,15 +1975,6 @@ static cJSON_bool add_item_to_array(cJSON *array, cJSON *item)
suffix_object(child->prev, item);
array->child->prev = item;
}
- else
- {
- while... | [
"cJSON.c",
"cJSON_Utils.c"
] | [] | true | ||
DaveGamble/cJSON | 505 | issue_to_patch | Release 1.7.14 | 2e5171d8d68c01445b042e6fa5b11d3efda47d89 | 8e84db4c4e631c5578a1d2365bbcc9d814ab8a51 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec63a513..ff0f5b2d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+1.7.14 (Sep 3, 2020)
+======
+Fixes:
+------
+* optimize the way to find tail node, see [#503](https://github.com/DaveGamble/cJSON/pull/503)
+* Fix WError error on macosx because NAN is a flo... | [
"CHANGELOG.md",
"CMakeLists.txt",
"CONTRIBUTORS.md",
"Makefile",
"cJSON.c",
"cJSON.h"
] | [] | true | |||
DaveGamble/cJSON | 519 | issue_to_patch | cJSON_Utils.c variable 'patch' is possible a dereference of null pointer
The "cJSON_Utils.c" line 1408 on the function of "static cJSON *generate_merge_patch(cJSON * const from, cJSON * const to, const cJSON_bool case_sensitive)"
```
from_child = from->child;
to_child = to->child;
patch = cJSON_CreateObject(); // ... | fix a possible dereference of null pointer | fix #516 | 488169facacba84a4c7e5a99fb833a34abaa169a | 9bf4960cd525428ddbfb9b13f39c4269083b18d7 | diff --git a/cJSON_Utils.c b/cJSON_Utils.c
index f4ad32a5..8e70e003 100644
--- a/cJSON_Utils.c
+++ b/cJSON_Utils.c
@@ -1406,6 +1406,10 @@ static cJSON *generate_merge_patch(cJSON * const from, cJSON * const to, const c
from_child = from->child;
to_child = to->child;
patch = cJSON_CreateObject();
+ if ... | [
"cJSON_Utils.c"
] | [] | true | |
DaveGamble/cJSON | 538 | issue_to_patch | Fix null pointer crash, closes #536 | 4100379a04f2f2838ffb00c4ad3d0dd9e49f4147 | 17d09a8acd12a679508238f2d7c6def16adfd194 | diff --git a/cJSON.c b/cJSON.c
index c06279d4a..0f079ae15 100644
--- a/cJSON.c
+++ b/cJSON.c
@@ -2548,12 +2548,8 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count)
}
a = cJSON_CreateArray();
- if (!a)
- {
- return NULL;
- }
- for(i = 0; i < (size_t)count; i++)
... | [
"cJSON.c"
] | [] | true | |||
DenverCoder1/readme-typing-svg | 469 | issue_to_patch | [DOCS] Use issue forms instead of issue templates
**Is your feature request related to a problem? Please describe.**
We can convert the current issue templates to issue forms, which have more variety of options
and also have required fields, dropdowns, and so much more.
**Describe the solution you'd like**
C... | chore: convert issue templates to issue forms | Closes #229
Converts the three existing markdown issue templates (bug report, feature request, question) to GitHub issue forms using YAML format. This adds:
- Required fields with validation
- Dropdowns and structured inputs
- Placeholder text for guidance
- A config.yml to disable blank issues | fd5b760501f91c7dc70d1b8f1ccc1777dbb7acf9 | 2394d779099e9c36e37112d0e7a4d74551e92628 | diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index cec36ab5..00000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ""
-labels: "bug"
-assignees: ""
... | [
".github/ISSUE_TEMPLATE/bug_report.md",
".github/ISSUE_TEMPLATE/bug_report.yml",
".github/ISSUE_TEMPLATE/config.yml",
".github/ISSUE_TEMPLATE/feature_request.md",
".github/ISSUE_TEMPLATE/feature_request.yml",
".github/ISSUE_TEMPLATE/question.md",
".github/ISSUE_TEMPLATE/question.yml"
] | [
{
"comment": "The PR description mentions adding dropdowns, but this bug-report form currently uses a free-text `input` for OS. If we want the changes to match the PR description (and standardize OS values), consider switching this field to a `dropdown` with common options.",
"path": ".github/ISSUE_TEMPLATE... | true | |
DenverCoder1/readme-typing-svg | 469 | comment_to_fix | chore: convert issue templates to issue forms | The PR description mentions adding dropdowns, but this bug-report form currently uses a free-text `input` for OS. If we want the changes to match the PR description (and standardize OS values), consider switching this field to a `dropdown` with common options. | fd5b760501f91c7dc70d1b8f1ccc1777dbb7acf9 | 2394d779099e9c36e37112d0e7a4d74551e92628 | diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 00000000..6b5ca102
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,68 @@
+name: Bug Report
+description: File a bug report to help us improve
+title: "[Bug]: "
+labels: ["bug"]
+bod... | [
".github/ISSUE_TEMPLATE/bug_report.yml"
] | [
{
"comment": "The PR description mentions adding dropdowns, but this bug-report form currently uses a free-text `input` for OS. If we want the changes to match the PR description (and standardize OS values), consider switching this field to a `dropdown` with common options.",
"path": ".github/ISSUE_TEMPLATE... | true | ||
DenverCoder1/readme-typing-svg | 469 | comment_to_fix | chore: convert issue templates to issue forms | The PR description mentions adding dropdowns, but this bug-report form currently uses a free-text `input` for Browser. If we want the changes to match the PR description (and standardize browser values), consider switching this field to a `dropdown` with common options. | fd5b760501f91c7dc70d1b8f1ccc1777dbb7acf9 | 2394d779099e9c36e37112d0e7a4d74551e92628 | diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 00000000..6b5ca102
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,68 @@
+name: Bug Report
+description: File a bug report to help us improve
+title: "[Bug]: "
+labels: ["bug"]
+bod... | [
".github/ISSUE_TEMPLATE/bug_report.yml"
] | [
{
"comment": "The PR description mentions adding dropdowns, but this bug-report form currently uses a free-text `input` for Browser. If we want the changes to match the PR description (and standardize browser values), consider switching this field to a `dropdown` with common options.",
"path": ".github/ISSU... | true | ||
DenverCoder1/readme-typing-svg | 447 | issue_to_patch | Missing icon on Toggle Theme button
**Describe the bug**
Missing icon on Toggle Theme button.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to demo page at https://readme-typing-svg.demolab.com/demo/
2. Look at button on top-right.
**Desktop (please complete the following information):**
- OS: Linux Mint... | fix: Fix theme toggle icons and add macOS install instructions | - Replace broken css.gg link with inline SVG moon/sun icons (fixes #434, #435)
- Add macOS (Homebrew) installation section to CONTRIBUTING.md
## Summary
- **Theme toggle (#434, #435):** Replaces the broken css.gg stylesheet with inline SVG moon/sun icons so the demo theme toggle always displays correctly.
- **D... | bd56571414f83b5b83a358fd30080d30444e9729 | d5228f80319bc95690573e09575c4d82517f9538 | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 031cf336..8c24a8ad 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -19,6 +19,17 @@ sudo apt-get install php-curl
sudo apt-get install composer
```
+#### macOS
+
+Using [Homebrew](https://brew.sh):
+
+```bash
+brew install php
+brew install composer
+```
+
+... | [
"CONTRIBUTING.md",
"src/demo/css/toggle-dark.css",
"src/demo/index.php",
"src/demo/js/toggle-dark.js"
] | [] | true | |
DenverCoder1/readme-typing-svg | 60 | issue_to_patch | Add your profile or repository to the README
Thanks to @WarenGonzaga for the idea of putting example usages in the README.
There is now an [🚀 Example usage](https://github.com/DenverCoder1/readme-typing-svg#-example-usage) section in the README for profiles and repositories that have unique usages of Typing SVGs.
... | Added example to README | ## Description
Fixes #21
### Type of change
- [x] Updated documentation (updated the readme, templates, or other repo files)
## Checklist:
- [x] I have checked to make sure no other pull requests are open for this issue
- [x] The code is properly formatted and is consistent with the existing code style... | 9eca1c277b44d14dbeb22f6f67b4548f8557aad4 | b45fe1317aeeb7220720dc518a34671e31042098 | diff --git a/README.md b/README.md
index 628de37d..d0111c7b 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ Here you can easily customize your Typing SVG with a live preview.
- **[Angelo Fallaria](https://github.com/angelofallars)**
- **[William J. Ghelfi](https://github.com/trumbitta)**
- **[Shivam Yadav](... | [
"README.md"
] | [] | true | |
DenverCoder1/readme-typing-svg | 302 | issue_to_patch | Letter Spacing
Some font families have letters that are very close together. That's why it would be nice if you could add the *letter spacing* function. | feat: Added Letter Spacing option | ## Summary
Added Letter Spacing option
resolves #251
## Type of change
- [x] New feature (added a non-breaking change which adds functionality)
## How Has This Been Tested?
- [x] Ran tests with `composer test`
- [x] Added or updated test cases to test new features
| 23491950b6483a91b4d19e79f2071369d746ff5f | 9b2659b49add3d11827dae74dd5e41a2642f06c7 | diff --git a/.gitignore b/.gitignore
index def28a32..5813be0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
vendor/
.vscode/
-.env
\ No newline at end of file
+.env
+.idea
\ No newline at end of file
diff --git a/README.md b/README.md
index 1d553a72..5e38ed76 100644
--- a/README.md
+++ b/README.md
@@ -120,... | [
".gitignore",
"README.md",
"src/demo/index.php",
"src/demo/js/script.js",
"src/models/RendererModel.php",
"src/templates/main.php",
"src/views/RendererView.php",
"tests/OptionsTest.php",
"tests/RendererTest.php",
"tests/svg/test_normal.svg"
] | [
{
"comment": "A tooltip could help here to explain how to enter a letter spacing value.\r\n\r\nAdditionally, the word \"Font\" in the label is probably not needed.\r\n\r\n```suggestion\r\n <div class=\"label-group\">\r\n <label for=\"letterSpacing\">Letter spacing</label>\r\n ... | diff --git a/tests/OptionsTest.php b/tests/OptionsTest.php
index 48ff687e..6b8411cd 100644
--- a/tests/OptionsTest.php
+++ b/tests/OptionsTest.php
@@ -367,4 +367,33 @@ public function testRandom(): void
$model = new RendererModel("src/templates/main.php", $params);
$this->assertEquals(false, $model->r... | true |
DenverCoder1/readme-typing-svg | 302 | comment_to_fix | feat: Added Letter Spacing option | A tooltip could help here to explain how to enter a letter spacing value.
Additionally, the word "Font" in the label is probably not needed.
```suggestion
<div class="label-group">
<label for="letterSpacing">Letter spacing</label>
<span class="icon toolti... | 23491950b6483a91b4d19e79f2071369d746ff5f | 9b2659b49add3d11827dae74dd5e41a2642f06c7 | diff --git a/src/demo/index.php b/src/demo/index.php
index 5c9184ca..657e03e4 100644
--- a/src/demo/index.php
+++ b/src/demo/index.php
@@ -70,6 +70,17 @@ function gtag() {
<label for="size">Font size</label>
<input class="param" type="number" id="size" name="size" alt="Font size" place... | [
"src/demo/index.php"
] | [
{
"comment": "A tooltip could help here to explain how to enter a letter spacing value.\r\n\r\nAdditionally, the word \"Font\" in the label is probably not needed.\r\n\r\n```suggestion\r\n <div class=\"label-group\">\r\n <label for=\"letterSpacing\">Letter spacing</label>\r\n ... | true | ||
DenverCoder1/readme-typing-svg | 388 | issue_to_patch | Added AhmedNassar7 to README | ## Summary
Added AhmedNassar7 to README
## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] Bug fix (added a non-breaking change which fixes an issue)
- [ ] New feature (added a non-breaking change which adds functionality)
- [x] Updated documentation (updated the readme, templat... | 3e32823ba399911c689308c75f3f97ea832ae8b5 | ddf82cbc091ef8ffd3dae4ad5fc8e655185f345f | diff --git a/README.md b/README.md
index 0d9a3e16..f273f6ba 100644
--- a/README.md
+++ b/README.md
@@ -138,6 +138,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/madhurimarawat "Madhurima Rawat on Gi... | [
"README.md"
] | [] | true | ||
DenverCoder1/readme-typing-svg | 385 | issue_to_patch | Added zhulixiao to README | a71b8445d4d0debfce0f6bdfc4d12d3a2f38b384 | 7781e6fd2889618cabc43393848d4123b90117cd | diff --git a/README.md b/README.md
index cabc186e..0d9a3e16 100644
--- a/README.md
+++ b/README.md
@@ -137,6 +137,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/Harr... | [
"README.md"
] | [] | true | |||
DenverCoder1/readme-typing-svg | 383 | issue_to_patch | Added wfxey to Readme | no comment needed I guess...
Nice thing to add to your readme!
I'd recommend it! | 49a437d62b72b503d54d04e40abf0f64a17eb7eb | d88bf5fe0e278cd25f052a8176e386b0f76e7db3 | diff --git a/README.md b/README.md
index 55e90678..cabc186e 100644
--- a/README.md
+++ b/README.md
@@ -136,6 +136,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/Muhammad-Noraeii "Muhammad Noraeii... | [
"README.md"
] | [] | true | ||
DenverCoder1/readme-typing-svg | 381 | issue_to_patch | docs(readme): Added madhurimarawat to examples | ### Example Usage
Added **Madhurima Rawat** profile in the example usage section.
| 30383df50b1640eecbf389942c52fa702af3d82d | cae4bb1cebc6ec22f00f9db5b3ebe0b5dd133386 | diff --git a/README.md b/README.md
index b8fbeca3..55e90678 100644
--- a/README.md
+++ b/README.md
@@ -135,6 +135,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/EchoSingh "Aditya Singh on Github")
[![Muham... | [
"README.md"
] | [] | true | ||
DenverCoder1/readme-typing-svg | 380 | issue_to_patch | [Demo site]When I use Edge's webpage translation, the webpage will use the translated text.
**Describe the bug**
When Edge translates the word **'true'** in this webpage to **'真'** in Chinese, it will use this text.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to the website.
2. Click on 'Translate' in Ed... | fix: disable translation on key elements | ## Summary
This change adds a mechanism (e.g., a `translate="no"` attribute) on key text elements to prevent Microsoft Edge from automatically translating specific words. This fix ensures that the intended text remains unchanged when using Edge's webpage translation feature.
## Type of change
<!-- Please delet... | 5601d376311a5e61912884640b4f8206ee18fe4c | bfae6441dd4e86eb413fb216af10a36e7d4c1417 | diff --git a/src/demo/index.php b/src/demo/index.php
index 8ac5ba54..e5e1ff5b 100644
--- a/src/demo/index.php
+++ b/src/demo/index.php
@@ -95,14 +95,14 @@ function gtag() {
<label for="center">Horizontally Centered</label>
<select class="param" id="center" name="center" alt="Horizont... | [
"src/demo/index.php"
] | [] | true | |
DenverCoder1/readme-typing-svg | 377 | issue_to_patch | docs: Added Muhammad-Noraeii to examples | ## Summary
<!-- Please include a summary of the change and which issue is fixed. -->
## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] Bug fix (added a non-breaking change which fixes an issue)
- [ ] New feature (added a non-breaking change which adds functionality)
- Updated ... | 9e9d48d383ccc5bbe9c773bec359f7162ed4f417 | 8a45914afefa68f9d2040703d86771678c7e7903 | diff --git a/README.md b/README.md
index a729164e..b8fbeca3 100644
--- a/README.md
+++ b/README.md
@@ -133,6 +133,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/saadhusayn "Saad Hussain on Github")
[![Rah... | [
"README.md"
] | [] | true | ||
DenverCoder1/readme-typing-svg | 373 | issue_to_patch | docs: Add Theglassofdata to examples | ## Summary
<!-- Please include a summary of the change and which issue is fixed. -->
## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] Bug fix (added a non-breaking change which fixes an issue)
- [ ] New feature (added a non-breaking change which adds functionality)
- [ ] Updat... | 79e547550e4d7c936a8d0601096d84a49f119a71 | f6b386e2ce374fcb27a4cea051f4f8bea508b43e | diff --git a/README.md b/README.md
index 3de96a2f..a729164e 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/EngineerRohit01 "Rohit on GitHub")
[![Sandeep... | [
"README.md"
] | [
{
"comment": "Looks good, but could you put this line around between 133 and 134 so it is in the right section\r\n\r\nYou can update it on your branch",
"path": "README.md",
"hunk": "@@ -205,3 +205,5 @@ Made with ❤️ and PHP\n <!-- markdownlint-enable MD033 -->\n \n This project uses [Twemoji](https://gi... | true | ||
DenverCoder1/readme-typing-svg | 373 | comment_to_fix | docs: Add Theglassofdata to examples | ```suggestion
``` | 79e547550e4d7c936a8d0601096d84a49f119a71 | f6b386e2ce374fcb27a4cea051f4f8bea508b43e | diff --git a/README.md b/README.md
index 3de96a2f..a729164e 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/EngineerRohit01 "Rohit on GitHub")
[![Sandeep... | [
"README.md"
] | [
{
"comment": "```suggestion\r\n```",
"path": "README.md",
"hunk": "@@ -207,3 +208,5 @@ Made with ❤️ and PHP\n <!-- markdownlint-enable MD033 -->\n \n This project uses [Twemoji](https://github.com/twitter/twemoji), published under the [CC-BY 4.0 License](https://creativecommons.org/licenses/by/4.0/)\n+\... | true | ||
DenverCoder1/readme-typing-svg | 376 | issue_to_patch | Update README.md | ## Summary
<!-- Please include a summary of the change and which issue is fixed. -->
## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] Bug fix (added a non-breaking change which fixes an issue)
- [ ] New feature (added a non-breaking change which adds functionality)
- [x] Updat... | da9dbbc7e40c01bc1cf6b509183c18c393c3d640 | 775e9de77ed55d724e4cc683b6504975ac049006 | diff --git a/README.md b/README.md
index fe1d2eb3..269c3368 100644
--- a/README.md
+++ b/README.md
@@ -132,6 +132,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/sandeep-Petwal "Sandeep Prasad on GitH... | [
"README.md"
] | [] | true | ||
DenverCoder1/readme-typing-svg | 375 | issue_to_patch | Added EchoSingh to README | Added example to README | 0f51d74a08175ee705f6ea89355d8c55067c7fbe | 58a567b7cb3fed35d9a4dfd80df7e027ca676c3e | diff --git a/README.md b/README.md
index c3f039ae..fe1d2eb3 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/EngineerRohit01 "Rohit on GitHub")
[![Sandeep... | [
"README.md"
] | [
{
"comment": "Extra newline can be removed, also linking to the profile page is fine\r\n```suggestion\r\n[](https://github.com/EchoSingh \"Aditya Singh on Github\")\r\n```",
"path": "README.md",
"hunk": "@@ -131,6 +131,8 @@ Below are links to prof... | true | ||
DenverCoder1/readme-typing-svg | 375 | comment_to_fix | Added EchoSingh to README | Extra newline can be removed, also linking to the profile page is fine
```suggestion
[](https://github.com/EchoSingh "Aditya Singh on Github")
``` | 0f51d74a08175ee705f6ea89355d8c55067c7fbe | 58a567b7cb3fed35d9a4dfd80df7e027ca676c3e | diff --git a/README.md b/README.md
index c3f039ae..fe1d2eb3 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,7 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[](https://github.com/EngineerRohit01 "Rohit on GitHub")
[![Sandeep... | [
"README.md"
] | [
{
"comment": "Extra newline can be removed, also linking to the profile page is fine\r\n```suggestion\r\n[](https://github.com/EchoSingh \"Aditya Singh on Github\")\r\n```",
"path": "README.md",
"hunk": "@@ -131,6 +131,8 @@ Below are links to prof... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.