function Archive_Tar::_readLongHeader

cis7 system.tar.inc Archive_Tar::_readLongHeader(&$v_header)
cle7 system.tar.inc Archive_Tar::_readLongHeader(&$v_header)
elmsmedia7 system.tar.inc Archive_Tar::_readLongHeader(&$v_header)
icor7 system.tar.inc Archive_Tar::_readLongHeader(&$v_header)
meedjum_blog7 system.tar.inc Archive_Tar::_readLongHeader(&$v_header)
mooc7 system.tar.inc Archive_Tar::_readLongHeader(&$v_header)
2 calls to Archive_Tar::_readLongHeader()
Archive_Tar::_extractInString in modules/system/system.tar.inc
This method extract from the archive one file identified by $p_filename. The return value is a string with the file content, or NULL on error.
Archive_Tar::_extractList in modules/system/system.tar.inc

File

modules/system/system.tar.inc, line 1376

Class

Archive_Tar
Creates a (compressed) Tar archive *

Code

function _readLongHeader(&$v_header) {
  $v_filename = '';
  $n = floor($v_header['size'] / 512);
  for ($i = 0; $i < $n; $i++) {
    $v_content = $this->_readBlock();
    $v_filename .= $v_content;
  }
  if (($v_header['size'] % 512) != 0) {
    $v_content = $this->_readBlock();
    $v_filename .= $v_content;
  }

  // ----- Read the next header
  $v_binary_data = $this->_readBlock();

  if (!$this->_readHeader($v_binary_data, $v_header)) {
    return false;
  }

  $v_filename = trim($v_filename);
  $v_header['filename'] = $v_filename;
  if ($this->_maliciousFilename($v_filename)) {
    $this->_error('Malicious .tar detected, file "' . $v_filename . '" will not install in desired directory tree');
    return false;
  }

  return true;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.