You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: library/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ All notable changes to the library will be documented in this file.
10
10
- Add `isbn` validation action to validate ISBN-10 and ISBN-13 strings (pull request #1097)
11
11
- Add exports for `RawCheckAddIssue`, `RawCheckContext`, `RawCheckIssueInfo`, `RawTransformAddIssue`, `RawTransformContext` and `RawTransformIssueInfo` types for better developer experience with `rawCheck` and `rawTransform` actions (pull request #1359)
12
12
- Change build step to tsdown
13
+
- Fix ReDoS vulnerability in `EMOJI_REGEX` used by `emoji` action
Copy file name to clipboardExpand all lines: website/src/routes/blog/(posts)/valibot-v1.2-release-notes/index.mdx
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ import { Link } from '~/components';
14
14
15
15
Valibot v1.2 is out! This version adds powerful transformation actions for type coercion, new metadata features to improve AI tool integration, and ISBN validation for library management systems. These additions make it easier to work with forms, APIs, and AI-powered applications while maintaining Valibot's modular design and minimal bundle size.
16
16
17
+
> This release also includes an important security fix for a ReDoS vulnerability in the <Linkhref="/api/emoji/">`emoji`</Link> action. If you're using this action, we strongly recommend upgrading as soon as possible.
18
+
17
19
This is our second minor release since v1, and we continue to prioritize stability and quality through our comprehensive test coverage. The work we've invested in maintaining robust tests continues to pay off with fewer bugs and a more reliable library. Before diving into the new features, I want to thank our amazing contributors who made this release possible.
18
20
19
21
## Contributors and acknowledgments
@@ -24,7 +26,7 @@ We're also excited to welcome [LambdaTest](https://lambdatest.com/) as a new par
24
26
25
27
## Type coercion made simple
26
28
27
-
One of the most requested features has been a straightforward way to coerce types in validation pipelines. Whether you're working with form data that arrives as strings, URL parameters, or API responses, type coercion is essential. With Valibot v1.2, we're introducing five new transformation actions that make this dead simple: <Linkhref="/api/toBigint/">`toBigint`</Link>, <Linkhref="/api/toBoolean/">`toBoolean`</Link>, <Linkhref="/api/toDate/">`toDate`</Link>, <Linkhref="/api/toNumber/">`toNumber`</Link>, and <Linkhref="/api/toString/">`toString`</Link>.
29
+
One requested features has been a straightforward way to coerce types in validation pipelines. Whether you're working with form data that arrives as strings, URL parameters, or API responses, type coercion is essential. With Valibot v1.2, we're introducing five new transformation actions that make this dead simple: <Linkhref="/api/toBigint/">`toBigint`</Link>, <Linkhref="/api/toBoolean/">`toBoolean`</Link>, <Linkhref="/api/toDate/">`toDate`</Link>, <Linkhref="/api/toNumber/">`toNumber`</Link>, and <Linkhref="/api/toString/">`toString`</Link>.
28
30
29
31
These actions use JavaScript's native coercion functions (`BigInt()`, `Boolean()`, `Date()`, `Number()`, `String()`) under the hood, but with added error handling to catch edge cases. For example, `toNumber` checks for `NaN` after conversion, and `toDate` validates that the resulting date is valid.
The <Linkhref="/api/isbn/">`isbn`</Link> action accepts hyphens and spaces as separators and validates the checksum to ensure the ISBN is mathematically correct. This is a great example of how domain-specific validation can be added to Valibot while maintaining our modular architecture and small bundle size.
118
120
121
+
## Security fix: ReDoS vulnerability
122
+
123
+
This release also includes an important security fix for a ReDoS (Regular Expression Denial of Service) vulnerability in the `EMOJI_REGEX` pattern used by the <Linkhref="/api/emoji/">`emoji`</Link> action. If you're using the <Linkhref="/api/emoji/">`emoji`</Link> action in your application, we strongly recommend upgrading to v1.2 as soon as possible.
124
+
125
+
The vulnerability could allow an attacker to cause excessive CPU usage by providing specially crafted input strings. We've updated the regex pattern to eliminate this risk while maintaining the same validation functionality. Thank you to [@makenowjust](https://github.com/makenowjust) for finding and responsibly disclosing this issue.
126
+
119
127
## Faster builds with tsdown
120
128
121
129
While this isn't a user-facing feature, we've switched our build process from tsup to [tsdown](https://www.npmjs.com/package/tsdown). Built on top of [Rolldown](https://rolldown.rs/)—which actually uses Valibot for validation—tsdown speeds up our build times, making development and releases faster. If we made no mistakes you won't notice any differences in functionality.
0 commit comments