Skip to content
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

Bypass upload_max_filesize is file_uploads if disabled #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions phpconfigcheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,15 +424,21 @@ function test_all_ini_entries()
}
break;
case 'upload_max_filesize':
if ($v === "2M") {
[$result, $reason] = [TEST_COMMENT, "default value."];
} elseif (ini_atol($v) >= ini_atol("2G")) {
[$result, $reason] = [TEST_MAYBE, "value is rather high."];
$upload_enabled = ini_get('file_uploads');
if (is_on($upload_enabled)) {
if ($v === "2M") {
[$result, $reason] = [TEST_COMMENT, "default value."];
} elseif (ini_atol($v) >= ini_atol("2G")) {
[$result, $reason] = [TEST_MAYBE, "value is rather high."];
}
}
break;
case 'max_file_uploads':
if (intval($v) > 30) {
[$result, $reason] = [TEST_MAYBE, "value is rather high."];
$upload_enabled = ini_get('file_uploads');
if (is_on($upload_enabled)) {
if (intval($v) > 30) {
[$result, $reason] = [TEST_MAYBE, "value is rather high."];
}
}
break;
case 'allow_url_fopen':
Expand Down