-
Notifications
You must be signed in to change notification settings - Fork 0
Raise WordPress upload limits and prevent false-positive upload 403s #33
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
Merged
+54
−7
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
75bb349
Add var/www/html/.user.ini: set PHP upload_max_filesize=100M, post_ma…
Copilot 5993429
Potential fix for pull request finding
MaximillianGroup 51002d5
Potential fix for pull request finding
MaximillianGroup b837792
Exempt WordPress upload routes from UA/geo 403 blocking
Copilot 176d534
Clarify upload-route security note in nginx snippet
Copilot 1b18287
Potential fix for pull request finding
MaximillianGroup ced68b6
Potential fix for pull request finding
MaximillianGroup 815e8d2
Tighten WP media REST location match
Copilot 728c04d
Split upload route blocking into hard and soft reasons
Copilot cee6f6a
Potential fix for pull request finding
MaximillianGroup 1eede20
Tighten WP REST media location regex to collection and numeric-ID pat…
Copilot e9305a9
Potential fix for pull request finding
MaximillianGroup 5b43a43
Potential fix for pull request finding
MaximillianGroup f0879e3
Potential fix for pull request finding
MaximillianGroup 4360393
Potential fix for pull request finding
MaximillianGroup 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| ; ============================================================================= | ||
| ; PHP-FPM per-directory upload size overrides | ||
| ; Deployed to: /var/www/html/.user.ini | ||
| ; | ||
| ; PHP-FPM scans for .user.ini files in the directory containing each requested | ||
| ; PHP file and all parent directories up to the document root, and caches the | ||
| ; result for user_ini.cache_ttl seconds (default typically 300). Settings placed | ||
| ; here apply to every PHP request served from /var/www/html/. | ||
| ; | ||
|
Copilot marked this conversation as resolved.
|
||
| ; NOTE: upload_max_filesize and post_max_size are PHP_INI_PERDIR entries that | ||
| ; must be configured via php.ini or an FPM pool .conf (not via ini_set()). | ||
| ; Web access to this file is blocked by the Nginx dotfile deny (location ~ /\. { deny all; }) | ||
| ; and by Apache common-settings.conf (<Files "\.(env|ini|mo|conf|log|bak|htaccess|example|git|svn)$"> Require all denied). | ||
| ; | ||
| ; These values are aligned with the nginx per-route body-size limits: | ||
| ; /wp-admin/update.php → client_max_body_size 64m | ||
| ; /wp-admin/async-upload.php → client_max_body_size 100m | ||
| ; /wp-json/wp/v2/media → client_max_body_size 100m | ||
| ; | ||
| ; upload_max_filesize: individual file cap — set below the 100m Nginx limit so a | ||
| ; multipart/form-data request (file + boundaries + fields) stays under the | ||
| ; upstream request-size cap. | ||
| ; | ||
| ; post_max_size: total POST body cap — must exceed upload_max_filesize to leave | ||
| ; room for multipart boundary and form fields. 100M provides ~5M headroom above | ||
| ; the 95M file cap. | ||
| ; | ||
| ; Cloudflare hard cap: ~100 MB per request (plan-dependent). The effective limit | ||
| ; is still capped upstream. | ||
| ; ============================================================================= | ||
|
|
||
| upload_max_filesize = 95M | ||
| post_max_size = 100M | ||
|
Comment on lines
+32
to
+33
Comment on lines
+32
to
+33
|
||
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.