-
Notifications
You must be signed in to change notification settings - Fork 3.3k
REST API: Add dimension validation to sideload endpoint #11100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
adamsilverstein
wants to merge
25
commits into
WordPress:trunk
Choose a base branch
from
adamsilverstein:add-dimension-validation-to-sideload
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
0229c11
REST API: Add 'scaled' to sideload route image_size enum
adamsilverstein 3832e25
Merge branch 'trunk' into add-scaled-to-sideload-route
adamsilverstein 0dcab83
REST API: Update auto-generated JS fixture for sideload route.
adamsilverstein 2fe2162
Tests: Add unit tests for scaled image sideloading via REST API.
adamsilverstein 133ec0f
REST API: Validate get_attached_file() in sideload
adamsilverstein a868b57
Tests: Fix expected error code in sideload auth test
adamsilverstein e5baa99
fix ticket number for test annotations
adamsilverstein 5405e38
Merge branch 'trunk' into add-scaled-to-sideload-route
adamsilverstein 02a9794
Merge branch 'trunk' into add-scaled-to-sideload-route
adamsilverstein 458d94c
Add value assertion for metadata file key
adamsilverstein 978ac79
Extract image_size key into variable
adamsilverstein eeca10e
Add test for scaled filename numeric suffix on conflict
adamsilverstein ae029f1
Cast $number to int in regex for safety
adamsilverstein a484e07
Apply suggestion from @westonruter
adamsilverstein fbe7458
Apply suggestion from @westonruter
adamsilverstein b30edb6
Handle update_attached_file failure in sideload
adamsilverstein 56c05e4
Use is_int check instead of empty for $number
adamsilverstein d558ceb
Validate scaled image before updating attached file
adamsilverstein 851f14a
Improve regex grouping in filter_wp_unique_filename.
adamsilverstein 6a95756
REST API: Add dimension validation to sideload endpoint.
adamsilverstein 2cb2454
REST API: Refactor dimension validation in sideload endpoint.
adamsilverstein 5474fcd
Update src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-c…
adamsilverstein 394bec7
Merge branch 'trunk' into add-dimension-validation-to-sideload
adamsilverstein 0cec0b0
revert unrelated
adamsilverstein 2566f7c
revert dupicate change
adamsilverstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.