diff options
Diffstat (limited to 'app/php/components')
-rw-r--r-- | app/php/components/FileUploadSecureFileSize.php | 18 | ||||
-rw-r--r-- | app/php/components/FileUploadSecureFileType.php | 19 | ||||
-rw-r--r-- | app/php/components/FileUploadSecureMethods.php | 16 | ||||
-rw-r--r-- | app/php/components/FileUploadSecureOption.php | 17 | ||||
-rw-r--r-- | app/php/components/SafeActiveFileUpload.php | 13 | ||||
-rw-r--r-- | app/php/components/SafeFileUpload.php | 11 |
6 files changed, 0 insertions, 94 deletions
diff --git a/app/php/components/FileUploadSecureFileSize.php b/app/php/components/FileUploadSecureFileSize.php deleted file mode 100644 index 1e60c9a..0000000 --- a/app/php/components/FileUploadSecureFileSize.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -Prado::using('Application.components.FileUploadSecureOption'); - -trait FileUploadSecureFileSize { - - use FileUploadSecureOption; - - public function getFileSize() { - if ($this->getIsSecure()) { - return filesize($this->getLocalName()); - } - return parent::getFileSize(); - } - -} - -?> diff --git a/app/php/components/FileUploadSecureFileType.php b/app/php/components/FileUploadSecureFileType.php deleted file mode 100644 index ce16501..0000000 --- a/app/php/components/FileUploadSecureFileType.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -Prado::using('Application.components.FileUploadSecureOption'); - -trait FileUploadSecureFileType { - - use FileUploadSecureOption; - - public function getFileType() { - if ($this->getIsSecure()) { - $fileInfo = new finfo(FILEINFO_MIME_TYPE); - return $fileInfo->file($this->getLocalName()); - } - return parent::getFileType(); - } - -} - -?> diff --git a/app/php/components/FileUploadSecureMethods.php b/app/php/components/FileUploadSecureMethods.php deleted file mode 100644 index 8a42240..0000000 --- a/app/php/components/FileUploadSecureMethods.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -Prado::using('Application.components.FileUploadSecureOption'); -Prado::using('Application.components.FileUploadSecureFileSize'); -Prado::using('Application.components.FileUploadSecureFileType'); - -trait FileUploadSecureMethods { - use FileUploadSecureOption, FileUploadSecureFileSize, FileUploadSecureFileType { - FileUploadSecureOption::getIsSecure - insteadof FileUploadSecureFileType, FileUploadSecureFileSize; - FileUploadSecureOption::setIsSecure - insteadof FileUploadSecureFileType, FileUploadSecureFileSize; - } -} - -?> diff --git a/app/php/components/FileUploadSecureOption.php b/app/php/components/FileUploadSecureOption.php deleted file mode 100644 index 3550e21..0000000 --- a/app/php/components/FileUploadSecureOption.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -trait FileUploadSecureOption { - - protected $_isSecure = TRUE; - - public function getIsSecure() { - return $this->_isSecure; - } - - public function setIsSecure($bool) { - $this->_isSecure = $bool; - } - -} - -?> diff --git a/app/php/components/SafeActiveFileUpload.php b/app/php/components/SafeActiveFileUpload.php deleted file mode 100644 index 69bffab..0000000 --- a/app/php/components/SafeActiveFileUpload.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -Prado::using('System.Web.UI.ActiveControls.TActiveFileUpload'); - -Prado::using('Application.components.FileUploadSecureMethods'); - -class SafeActiveFileUpload extends TActiveFileUpload { - - use FileUploadSecureMethods; - -} - -?> diff --git a/app/php/components/SafeFileUpload.php b/app/php/components/SafeFileUpload.php deleted file mode 100644 index a8cbcae..0000000 --- a/app/php/components/SafeFileUpload.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -Prado::using('Application.components.FileUploadSecureMethods'); - -class SafeFileUpload extends TFileUpload { - - use FileUploadSecureMethods; - -} - -?> |