mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Add CSRF check
This commit is contained in:
parent
0d349e331e
commit
3139636906
2 changed files with 2 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ $htaccessWorking=(getenv('htaccessWorking')=='true');
|
|||
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
|
||||
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
|
||||
$maxUploadFilesize = OCP\Util::humanFileSize(min($upload_max_filesize, $post_max_size));
|
||||
if($_POST) {
|
||||
if($_POST && OC_Util::isCallRegistered()) {
|
||||
if(isset($_POST['maxUploadSize'])) {
|
||||
if(($setMaxSize = OC_Files::setUploadLimit(OCP\Util::computerFileSize($_POST['maxUploadSize']))) !== false) {
|
||||
$maxUploadFilesize = OCP\Util::humanFileSize($setMaxSize);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> />
|
||||
<label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files' ); ?> </label><br />
|
||||
|
||||
<input type="hidden" value="<?php echo $_['requesttoken']; ?>" name="requesttoken" />
|
||||
<input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings" value="<?php echo $l->t( 'Save' ); ?>"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in a new issue