/home/techb158/balacoffee.com/wp-content/plugins/updraftplus/includes
NameSizeModeActions
Backblaze/-0755rm
blockui/-0755rm
checkout-embed/-0755rm
cloudfiles/-0755rm
Dropbox2/-0755rm
Google/-0755rm
handlebars/-0755rm
images/-0755rm
jquery-ui.dialog.extended/-0755rm
jquery.serializeJSON/-0755rm
jstree/-0755rm
labelauty/-0755rm
onedrive/-0755rm
pcloud/-0755rm
PEAR/-0755rm
select2/-0755rm
tether/-0755rm
tether-shepherd/-0755rm
updraftclone/-0755rm
WindowsAzure/-0755rm
azure-extensions.php33170644editdlrm
cacert.pem2080650644editdlrm
class-backup-history.php403550644editdlrm
class-commands.php488030644editdlrm
class-database-utility.php343210644editdlrm
class-filesystem-functions.php362270644editdlrm
class-http-error-descriptions.php102390644editdlrm
class-job-scheduler.php105520644editdlrm
class-manipulation-functions.php171360644editdlrm
class-onedrive-account.php15900644editdlrm
class-partialfileservlet.php70820644editdlrm
class-remote-send.php306640644editdlrm
class-search-replace.php206850644editdlrm
class-semaphore.php64240644editdlrm
class-storage-methods-interface.php186120644editdlrm
class-updraft-dashboard-news.php81370644editdlrm
class-updraft-semaphore.php76930644editdlrm
class-updraftcentral-updraftplus-commands.php18570644editdlrm
class-updraftplus-encryption.php138870644editdlrm
class-wpadmin-commands.php366460644editdlrm
class-zip.php183010644editdlrm
ftp.class.php66580644editdlrm
get-cpanel-quota-usage.pl4080644editdlrm
google-extensions.php93730644editdlrm
jquery-ui.custom-v1.11.4-2-23-4.min.css387510644editdlrm
jquery-ui.custom-v1.11.4-2-23-4.min.css.map583740644editdlrm
jquery-ui.custom-v1.11.4.css431930644editdlrm
jquery-ui.custom-v1.12.1-2-23-4.min.css404970644editdlrm
jquery-ui.custom-v1.12.1-2-23-4.min.css.map608390644editdlrm
jquery-ui.custom-v1.12.1.css450900644editdlrm
S3.php785520644editdlrm
S3compat.php319710644editdlrm
updraft-admin-common-2-23-4.min.js1521150644editdlrm
updraft-admin-common.js2512090644editdlrm
updraft-restorer-skin-compatibility.php4520644editdlrm
updraft-restorer-skin.php17230644editdlrm
updraftcentral.php27590644editdlrm
updraftplus-clone.php71360644editdlrm
updraftplus-login.php43680644editdlrm
updraftplus-notices.php214280644editdlrm
updraftplus-tour.php132950644editdlrm
updraftvault.php20400644editdlrm
Edit: /home/techb158/balacoffee.com/wp-content/plugins/updraftplus/includes/class-partialfileservlet.php (7082B)
firstByte = $firstByte === null ? $firstByte : (int)$firstByte; $this->lastByte = $lastByte === null ? $lastByte : (int)$lastByte; if ($this->firstByte === null && $this->lastByte === null) { throw new UpdraftPlus_InvalidRangeHeaderException( 'Both start and end position specifiers empty' ); } else if ($this->firstByte < 0 || $this->lastByte < 0) { throw new UpdraftPlus_InvalidRangeHeaderException( 'Position specifiers cannot be negative' ); } else if ($this->lastByte !== null && $this->lastByte < $this->firstByte) { throw new UpdraftPlus_InvalidRangeHeaderException( 'Last byte cannot be less than first byte' ); } } /** * Get the start position when this range is applied to a file of the specified size * * @param int $fileSize * @return int * @throws UpdraftPlus_UnsatisfiableRangeException */ public function getStartPosition($fileSize) { $size = (int)$fileSize; if ($this->firstByte === null) { return ($size - 1) - $this->lastByte; } if ($size <= $this->firstByte) { throw new UpdraftPlus_UnsatisfiableRangeException( 'Start position is after the end of the file' ); } return $this->firstByte; } /** * Get the end position when this range is applied to a file of the specified size * * @param int $fileSize * @return int * @throws UpdraftPlus_UnsatisfiableRangeException */ public function getEndPosition($fileSize) { $size = (int)$fileSize; if ($this->lastByte === null) { return $size - 1; } if ($size <= $this->lastByte) { throw new UpdraftPlus_UnsatisfiableRangeException( 'End position is after the end of the file' ); } return $this->lastByte; } /** * Get the length when this range is applied to a file of the specified size * * @param int $fileSize * @return int * @throws UpdraftPlus_UnsatisfiableRangeException */ public function getLength($fileSize) { $size = (int)$fileSize; return $this->getEndPosition($size) - $this->getStartPosition($size) + 1; } /** * Get a Content-Range header corresponding to this Range and the specified file * size * * @param int $fileSize * @return string */ public function getContentRangeHeader($fileSize) { return 'bytes ' . $this->getStartPosition($fileSize) . '-' . $this->getEndPosition($fileSize) . '/' . $fileSize; } } class UpdraftPlus_PartialFileServlet { /** * The range header on which the data transmission will be based * * @var UpdraftPlus_RangeHeader|null */ private $range; /** * @param UpdraftPlus_RangeHeader $range Range header on which the transmission will be based */ public function __construct($range = null) { $this->range = $range; } /** * Send part of the data in a seekable stream resource to the output buffer * * @param resource $fp Stream resource to read data from * @param int $start Position in the stream to start reading * @param int $length Number of bytes to read * @param int $chunkSize Maximum bytes to read from the file in a single operation */ private function sendDataRange($fp, $start, $length, $chunkSize = 2097152) { if ($start > 0) { fseek($fp, $start, SEEK_SET); } while ($length) { $read = ($length > $chunkSize) ? $chunkSize : $length; $length -= $read; echo fread($fp, $read); } } /** * Send the headers that are included regardless of whether a range was requested * * @param string $fileName * @param int $contentLength * @param string $contentType */ private function sendDownloadHeaders($fileName, $contentLength, $contentType) { header('Content-Type: ' . $contentType); header('Content-Length: ' . $contentLength); header('Content-Disposition: attachment; filename="' . $fileName . '"'); header('Accept-Ranges: bytes'); } /** * Send data from a file based on the current Range header * * @param string $path Local file system path to serve * @param string $contentType MIME type of the data stream */ public function sendFile($path, $contentType = 'application/octet-stream') { // Make sure the file exists and is a file, otherwise we are wasting our time $localPath = realpath($path); if ($localPath === false || !is_file($localPath)) { throw new UpdraftPlus_NonExistentFileException( $path . ' does not exist or is not a file' ); } // Make sure we can open the file for reading if (!$fp = fopen($localPath, 'r')) { throw new UpdraftPlus_UnreadableFileException( 'Failed to open ' . $localPath . ' for reading' ); } $fileSize = filesize($localPath); if ($this->range == null) { // No range requested, just send the whole file header('HTTP/1.1 200 OK'); $this->sendDownloadHeaders(basename($localPath), $fileSize, $contentType); fpassthru($fp); } else { // Send the request range header('HTTP/1.1 206 Partial Content'); header('Content-Range: ' . $this->range->getContentRangeHeader($fileSize)); $this->sendDownloadHeaders( basename($localPath), $this->range->getLength($fileSize), $contentType ); $this->sendDataRange( $fp, $this->range->getStartPosition($fileSize), $this->range->getLength($fileSize) ); } fclose($fp); } }