Repository navigation
Trust a value Validator::make() checked against a regex rule once the validator passes - #2358
Merged
Merged
Conversation
… validator passes
Contributor
|
| Project | psalm-plugin-laravel |
| Branch | pr-2358 |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result seconds (s) (Result Δ%) | Upper Boundary seconds (s) (Limit %) | Peak Memory | Benchmark Result megabytes (MB) x 1e3 (Result Δ%) | Upper Boundary megabytes (MB) x 1e3 (Limit %) |
|---|---|---|---|---|---|---|
| monica | 📈 view plot 🚷 view threshold | 44.69 s(+2.66%)Baseline: 43.53 s | 46.05 s (97.04%) | 📈 view plot 🚷 view threshold | 1.17 MB x 1e3(+0.06%)Baseline: 1.17 MB x 1e3 | 1.23 MB x 1e3 (95.30%) |
…acade and validator() too Facade calls are @method pseudo-methods, for which Psalm dispatches no AfterMethodCallAnalysis. Skip keys a spread or an unknown key can override, the last item of a key wins, and rules of nested or wildcard attributes and of fields the validator may exclude don't validate the value.
Validator::make() checked against a regex rule once the validator passes
Under vimeo/psalm#14158 a value stored in the session is reported where it is read back, not where it is stored.
# Conflicts: # composer.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A value
Validator::make()checked against aregex:rule is still reported once the validator doesn't fail.Before
After
validator($data, $rules)too. A rule of another key, of a nested attribute or of a field the validator may exclude, or none restricting the characters, still leaves it tainted.Needs Psalm 7.13, with vimeo/psalm#14176 (
Codebase::addTaintValidation()), and #2370.