Commit Graph
1860 Commits
Author SHA1 Message Date
dependabot[bot] 8d9a3c3ab3 build(deps): bump the official-actions group with 2 updates (#3429) 2025-10-27 16:48:33 +09:00
Ish Nagy b29504b4e1 Increase the maximum printing depth from 256 to 10000 (fixes #3413) (#3414) 2025-10-14 14:12:57 +09:00
Sudhakar Verma 589a6947fa jq_fuzz_execute: limit oniguruma depth to 1024 (#3377)
Fixes #3375 - I'll also fix the oss-fuzz build for this in a PR

Signed-off-by: Sudhakar Verma <sudhakar.verma@canonical.com>
2025-10-05 12:50:42 +09:00
dependabot[bot] c9c96b3cdd build(deps): bump lxml from 6.0.1 to 6.0.2 in /docs (#3416) 2025-10-01 06:39:11 +00:00
dependabot[bot] f240512140 build(deps): bump markdown from 3.8.2 to 3.9 in /docs (#3418) 2025-10-01 06:37:39 +00:00
dependabot[bot] 2b084a6d2d build(deps): bump pyyaml from 6.0.2 to 6.0.3 in /docs (#3417) 2025-10-01 06:37:20 +00:00
A4-Tacks 169457328d Fix rtrimstr("") always output "" (#3415)
Example
---
**Before this fix**:

```sh
$ jq -n '"foo"|rtrimstr("")'
""
```

**After this fix**:

```sh
$ jq -n '"foo"|rtrimstr("")'
"foo"
```
2025-09-29 17:15:43 +02:00
itchyny c8017bf079 Fix localization test for time formatting functions (fix #3368) (#3409) 2025-09-15 07:48:02 +09:00
itchyny a4d9d54010 Fix expected value assertion for NaN value (fix #3393) (#3408) 2025-09-15 07:47:51 +09:00
itchyny 695830c453 Fix year 2038 problem on 32-bit platforms (fix #3369) (#3407) 2025-09-15 07:46:29 +09:00
Kartik Shah cd3a4c3d31 Remove extra space from die func output (#3391) 2025-09-15 07:43:10 +09:00
dependabot[bot] 63c5f4e196 build(deps): bump the official-actions group with 2 updates (#3405) 2025-09-09 11:57:01 +00:00
dependabot[bot] 755ac61755 build(deps): bump jsonschema from 4.25.0 to 4.25.1 in /docs (#3404) 2025-09-05 12:02:28 +00:00
dependabot[bot] 68f9e0a7e1 build(deps): bump lxml from 6.0.0 to 6.0.1 in /docs (#3403) 2025-09-05 12:01:56 +00:00
dependabot[bot] 21471c5e3b build(deps): bump the official-actions group across 1 directory with 3 updates (#3401) 2025-08-27 03:05:20 +00:00
dependabot[bot] a8115e5bc9 build(deps): bump jsonschema from 4.24.0 to 4.25.0 in /docs (#3382)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 21:12:16 +09:00
itchyny 0ff997f7c4 Update GPG signing key (fix #3381) 2025-07-31 23:00:24 +09:00
Dennis Ameling 4357b6154e CI: add builds for Windows arm64 (#3376) 2025-07-27 08:23:57 +09:00
Alyssa Ross 3c5ceac8e7 jq.test: drop non-portable %F test (#3365)
%F is a non-portable GNU extension, not supported by all strptime
implementations (for example musl's).
2025-07-05 01:25:28 +09:00
itchyny b9e19de76e Update jq documentation for jq 1.8.1 release 2025-07-01 20:54:28 +09:00
github-actions[bot]andgithub-actions[bot] 3db7b519bf Update signatures of 1.8.1 (#3364)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-01 20:50:42 +09:00
itchyny 4467af7068 Update NEWS.md and AUTHORS for 1.8.1 (#3353) jq-1.8.1 2025-07-01 19:36:14 +09:00
dependabot[bot] 98a1176cff build(deps): bump pyyaml from 6.0.1 to 6.0.2 in /docs (#3363)
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.1 to 6.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/yaml/pyyaml/releases">pyyaml's
releases</a>.</em></p>
<blockquote>
<h2>6.0.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Support for Cython 3.x and Python 3.13.</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2">https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2</a></p>
<h2>6.0.2rc1</h2>
<ul>
<li>Support for extension build with Cython 3.x</li>
<li>Support for Python 3.13</li>
<li>Added PyPI wheels for musllinux on aarch64</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/yaml/pyyaml/blob/main/CHANGES">pyyaml's
changelog</a>.</em></p>
<blockquote>
<p>6.0.2 (2024-08-06)</p>
<ul>
<li><a
href="https://redirect.github.com/yaml/pyyaml/pull/808">yaml/pyyaml#808</a>
-- Support for Cython 3.x and Python 3.13</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/yaml/pyyaml/commit/41309b0bcb4559edb1d691d47199035ef539d785"><code>41309b0</code></a>
Release 6.0.2 (<a
href="https://redirect.github.com/yaml/pyyaml/issues/819">#819</a>)</li>
<li><a
href="https://github.com/yaml/pyyaml/commit/dd9f0e1236775dcce682c91823e009556ce2a271"><code>dd9f0e1</code></a>
6.0.2rc1 (<a
href="https://redirect.github.com/yaml/pyyaml/issues/809">#809</a>)</li>
<li><a
href="https://github.com/yaml/pyyaml/commit/f5527a26d518b3e9c66f9211e0af00c83f09a97e"><code>f5527a2</code></a>
disable CI trigger on PR edits</li>
<li><a
href="https://github.com/yaml/pyyaml/commit/b4d80a742142004490d2da7691d534923820b81c"><code>b4d80a7</code></a>
Python 3.12 + musllinux_1_1_x86_64 wheel support</li>
<li>See full diff in <a
href="https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyyaml&package-manager=pip&previous-version=6.0.1&new-version=6.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 19:29:37 +09:00
dependabot[bot] 205b3a2d75 build(deps): bump lxml from 5.4.0 to 6.0.0 in /docs (#3362)
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=lxml&package-manager=pip&previous-version=5.4.0&new-version=6.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 17:31:54 +09:00
dependabot[bot] d21e506d52 build(deps): bump markdown from 3.8 to 3.8.2 in /docs (#3361)
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=markdown&package-manager=pip&previous-version=3.8&new-version=3.8.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 17:19:03 +09:00
TheOdd 11f43e9d93 Fixed minor typo in docs (#3359) 2025-06-30 07:31:28 +09:00
엄태용 2e6987967e Use jv_mem_alloc to allocate dtoa_context in tsd_dtoa_context_get (#3356) 2025-06-30 07:27:24 +09:00
itchyny 0b1ef46973 Add oniguruma library path to link jq program 2025-06-24 23:49:32 +09:00
Mattias Wadman 5e159b34b1 Fix GHSA-f946-j5j2-4w5m stack-overflow by limit regex parse depth
Was detect by AFL build but it's unsure if possible to trigger in non-fuzz build.

Oniguruma has a default limit of 4096 but this is not be low enough to
protect from stack-overflows in some builds like with AFL where it seems
to use more stack space. A limit of 1024 should be enough usage-wise
and also give more margin.
2025-06-24 15:39:40 +02:00
Mattias Wadman 499c91bca9 Fixes CVE-2025-49014 which was introduced in 1.8.0 2025-06-19 00:11:01 +02:00
itchyny edbc1da809 Revert "fix: reduce/foreach state variable should not be reset each iteration" (#3349)
This reverts 96e8d893c1. The change
introduced a serious performance regression as reported in #3345.
2025-06-17 15:29:46 +09:00
itchyny a587ddc5a3 Fix syntax error assertion failure (fix #3348) (#3350) 2025-06-17 15:25:46 +09:00
itchyny 78045d8aa9 Add LICENSE notice of NetBSD's strptime() to COPYING (#3344) 2025-06-14 08:01:10 +09:00
itchyny 7cc202aa6e Fix portability of strptime especially for Windows (#3342) 2025-06-14 08:00:55 +09:00
dependabot[bot] 859a8073ee build(deps): bump jsonschema from 4.23.0 to 4.24.0 in /docs (#3332) 2025-06-03 06:24:14 +09:00
Binbin Qian 023f274ee9 Fix build on old Macs (#3336) 2025-06-03 06:22:20 +09:00
itchyny 62cafa2367 Update jq documentation for jq 1.8.0 release (#3333) 2025-06-01 16:38:16 +09:00
github-actions[bot]andgithub-actions[bot] 89d657e3fa Update signatures of 1.8.0 (#3331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-01 15:05:24 +09:00
itchyny d23a7b9db9 Update NEWS.md and AUTHORS for 1.8.0 (#3330) jq-1.8.0 2025-06-01 14:51:21 +09:00
itchyny d3cf5caf72 Add more test cases for JQ_COLORS support (ref #3288) 2025-05-31 16:29:02 +09:00
SArpnt aa977aa716 Dynamically allocate JQ_COLORS escapes for truecolor support (#3282) 2025-05-31 15:49:17 +09:00
itchyny c6e041699d Fix heap buffer overflow when formatting an empty string
The `jv_string_empty` did not properly null-terminate the string data,
which could lead to a heap buffer overflow. The test case of
GHSA-p7rr-28xf-3m5w (`0[""*0]`) was fixed by the commit dc849e9bb7,
but another case (`0[[]|implode]`) was still vulnerable. This commit
ensures string data is properly null-terminated, and fixes CVE-2025-48060.
2025-05-31 11:46:40 +09:00
itchyny 3b00981acd Fix quotes in 1.7 manual for ease of taking diff between versions (#3329) 2025-05-31 11:31:54 +09:00
itchyny f28720f699 Increase the maximum parsing depth for parsing JSON to 10000 (#3328)
This is the same limit as encoding/json in Go and should be sufficient for most use cases.
2025-05-30 20:19:34 +09:00
Thalia Archibald 9ac6ddae22 Fix whitespace in number parsing (#3195)
* Handle input errors for --indent

Handle malformed and overflowing arguments. Also, forbid leading and
trailing spaces to match the behavior of tonumber from commit ce0e788
(improve tonumber/0 performance by parsing input as number literal,
2024-03-02).

* Do not skip leading whitespace in jvp_strtod

`jvp_strtod` skips leading whitespace, but its decnum counterpart
`decNumberFromString` (called within `jv_number_with_literal`) does not.
Those two are called interchangeably, so it leads to inconsistent
behavior depending on whether the decnum feature is enabled.
Additionally, `classify`, used in the token scanner, only considers
[ \t\n\r] to be whitespace, but `jvp_strtod` consumes the larger set
[ \t\n\v\f\r], so those extra characters are considered literals.

Changing this deviates from the behavior of `strdod` from <stdlib.h> and
is technically a breaking API change, since it is a public symbol.
2025-05-29 04:11:00 +09:00
itchyny aaace5432a Fix parser to allow binary operators for binding syntax (#3326)
Previously, the precedence of `as` binding was higher than the binary
operators. This results in unexpected behaviors, `1 + 2 as $x | -$x`
was `-1` instead of `-3`. The commit 92daac90f6 (PR #3053) changed
the behavior to emit syntax error on this case. Now, this commit allows
binary operators with `as` binding. This fixes #2446, and fixes #3284.
2025-05-23 21:25:30 +09:00
itchyny 4e3088f188 Fix behavior of --slurp --stream when input has no trailing newline character (#3279)
This commit fixes a strange behavior of the combination of `--slurp` and
`--stream` flags when the input has no trailing newline character.
2025-05-22 08:04:05 +09:00
Gabriel Marin 7d8c096e48 Add trimstr/1 function (#3319) 2025-05-21 18:46:04 +09:00
itchyny de21386681 Fix signed integer overflow in jvp_array_write and jvp_object_rehash
This commit fixes signed integer overflow and SEGV issues on growing
arrays and objects. The size of arrays and objects is now limited to
`536870912` (`0x20000000`). This fixes CVE-2024-23337 and fixes #3262.
2025-05-21 07:48:23 +09:00
itchyny 4e2ccc4c9b Fix and refactor scan-build workflow to run on the master branch (#3325) 2025-05-20 20:00:53 +09:00