code
stringlengths
12
2.05k
label_name
stringlengths
6
8
label
int64
0
95
public function fetchFormFromTemplate($id) { }
CWE-94
14
function process_subsections($parent_section, $subtpl) { global $db, $router; $section = new stdClass(); $section->parent = $parent_section->id; $section->name = $subtpl->name; $section->sef_name = $router->encode($section->name); $...
CWE-89
0
public function __construct(Image $image, File $file, ImageRepo $imageRepo) { $this->image = $image; $this->file = $file; $this->imageRepo = $imageRepo; }
CWE-22
2
function audit($method, $class, $statement, $formats, $values, $users_id) { $this->method = $method; $this->class = $class; $this->statement = substr(str_replace("'", "", $statement),0,1000)."n"; $this->formats = $formats; $this->values = $values; $this->ip = ge...
CWE-89
0
public static function data($vars){ $file = GX_THEME.'/'.$vars.'/themeinfo.php'; $handle = fopen($file, 'r'); $data = fread($handle, filesize($file)); fclose($handle); preg_match('/\* Name: (.*)\n\*/U', $data, $matches); $d['name'] = $matches[1]; preg_m...
CWE-89
0
public function remove() { $this->checkCSRFParam(); $project = $this->getProject(); $category = $this->getCategory(); if ($this->categoryModel->remove($category['id'])) { $this->flash->success(t('Category removed successfully.')); } else { $this->...
CWE-639
9
public function remove() { $this->checkCSRFParam(); $project = $this->getProject(); $action = $this->actionModel->getById($this->request->getIntegerParam('action_id')); if (! empty($action) && $this->actionModel->remove($action['id'])) { $this->flash->success(t('Acti...
CWE-639
9
public function uploadCompanyLogo(Request $request) { $company = Company::find($request->header('company')); $this->authorize('manage company', $company); $data = json_decode($request->company_logo); if ($data) { $company = Company::find($request->header('company')...
CWE-79
1
public function confirm() { $project = $this->getProject(); $this->response->html($this->helper->layout->project('column/remove', array( 'column' => $this->columnModel->getById($this->request->getIntegerParam('column_id')), 'project' => $project, ))); }
CWE-639
9
protected function _filePutContents($path, $content) { $res = false; if ($this->tmp) { $local = $this->getTempFile(); if (@file_put_contents($local, $content, LOCK_EX) !== false && ($fp = @fopen($local, 'rb'))) { clearstatcache(); $res = ftp_fput($this->connect, $path, $fp, $this->ftpMode($p...
CWE-89
0
$rst[$key] = self::parseAndTrim($st, $unescape); } return $rst; } $str = str_replace("<br>"," ",$str); $str = str_replace("</br>"," ",$str); $str = str_replace("<br/>"," ",$str); $str = str_replace("<br />"," ",$str); $str = str_re...
CWE-89
0
$src = substr($ref->source, strlen($prefix)) . $section->id; if (call_user_func(array($ref->module, 'hasContent'))) { $oloc = expCore::makeLocation($ref->module, $ref->source); $nloc = expCore::makeLocation($ref->module, $src); if ($ref->module...
CWE-89
0
function path_f ($path) { global $home_dir; $abs_dir = $home_dir; switch ($path) { case '.': case '': return realpath($abs_dir); } return realpath(realpath($home_dir) . "/$path"); }
CWE-22
2
function load_gallery($auc_id) { $UPLOADED_PICTURES = array(); if (is_dir(UPLOAD_PATH . $auc_id)) { if ($dir = opendir(UPLOAD_PATH . $auc_id)) { while ($file = @readdir($dir)) { if ($file != '.' && $file != '..' && strpos($file, 'thumb-') === false) { $UPL...
CWE-22
2
public static function exist($tag) { $sql = "SELECT `name` FROM `cat` WHERE `name` = '{$tag}'"; $q = Db::result($sql); if (Db::$num_rows > 0) { return true; }else{ return false; } }
CWE-89
0
function change_pass() { global $txp_user; extract(psa(array('new_pass', 'mail_password'))); if (empty($new_pass)) { author_list(array(gTxt('password_required'), E_ERROR)); return; } $rs = change_user_password($txp_user, $new_pass); if ($rs) { $message = gTxt('passwo...
CWE-521
4
} elseif (!empty($this->params['src'])) { if ($this->params['src'] == $loc->src) { $this->config = $config->config; break; } } }
CWE-89
0
function captureAuthorization() { //eDebug($this->params,true); $order = new order($this->params['id']); /*eDebug($this->params); //eDebug($order,true);*/ //eDebug($order,true); //$billing = new billing(); //eDebug($billing, true); //$billing->calcul...
CWE-89
0
public function Connect ($host, $port = false, $tval = 30) { // Are we already connected? if ($this->connected) { return true; } /* On Windows this will raise a PHP Warning error if the hostname doesn't exist. Rather than supress it with @fsockopen, let's capture it cleanly instead ...
CWE-79
1
public static function sessionDataDecode(&$var, $checkIs = null) { if (self::$base64encodeSessionData) { $data = @unserialize(@base64_decode($var)); } else { $data = $var; } $chk = true; if ($checkIs) { switch ($checkIs) { case 'array': $chk = is_array($data); break; case 'string':...
CWE-89
0
protected function itemLock($hashes, $autoUnlock = true) { if (!elFinder::$commonTempPath) { return; } if (!is_array($hashes)) { $hashes = array($hashes); } foreach ($hashes as $hash) { $lock = elFinder::$commonTempPath . DIRECTORY_SEPA...
CWE-78
6
function _makeChooseCheckbox($value, $title) { global $THIS_RET; // return '<INPUT type=checkbox name=st_arr[] value=' . $value . ' checked>'; return "<input name=unused[$THIS_RET[STUDENT_ID]] value=" . $THIS_RET[STUDENT_ID] . " type='checkbox' id=$THIS_RET[STUDENT_ID] onClick='setHiddenCheckboxStudent...
CWE-22
2
public function testVeryLongHosts($host) { $start = microtime(true); $request = Request::create('/'); $request->headers->set('host', $host); $this->assertEquals($host, $request->getHost()); $this->assertLessThan(3, microtime(true) - $start); }
CWE-89
0
public function __construct(public Config $Config, private Sql $Sql) { $this->Db = Db::getConnection(); }
CWE-307
26
public static function insert ($vars) { if(is_array($vars)){ $set = ""; $k = ""; foreach ($vars['key'] as $key => $val) { $set .= "'$val',"; $k .= "`$key`,"; } $set = substr($set, 0,-1); $k =...
CWE-89
0
public static function getURI () { $uri = $_SERVER['REQUEST_URI']; // echo $uri; // strip any $_REQUEST variable $uri = explode('?', $uri); if (count($uri) > 0) { unset($uri[1]); } // print_r($uri[0]); if (self::inFolder()) {...
CWE-89
0
public function quicksearch($text) { global $DB; global $website; $like = ' LIKE '.protect('%'.$text.'%'); // we search for the IDs at the dictionary NOW (to avoid inefficient requests) $DB->query('SELECT DISTINCT (nvw.node_id) FROM nv_webdictionary nvw WHERE nvw.node_type = ...
CWE-79
1
public function checkForReassign($operator) { $operator_name = ($this->locale == get_home_locale()) ? $operator['vclocalename'] : $operator['vccommonname']; $is_operator_correct = $this->nextAgent == $operator['operatorid'] || $this->agentId == $operator['ope...
CWE-79
1
function db_properties($table) { global $DatabaseType, $DatabaseUsername; switch ($DatabaseType) { case 'mysqli': $result = DBQuery("SHOW COLUMNS FROM $table"); while ($row = db_fetch_row($result)) { $properties[strtoupper($row['FIELD'])]['TYPE'] = strtoupper($ro...
CWE-22
2
private function getTaskLink() { $link = $this->taskLinkModel->getById($this->request->getIntegerParam('link_id')); if (empty($link)) { throw new PageNotFoundException(); } return $link; }
CWE-639
9
function edit() { global $user; /* The global constants can be overriden by passing appropriate params */ //sure wish I could do this once in the constructor. sadly $this->params[] isn't set yet $require_login = empty($this->params['require_login']) ? SIMPLENOTE_REQUIRE_LOG...
CWE-89
0
private function formatResponse($view, $title, $settings, $status = 'ok') { if ($view instanceof View) { $html = $view->__toString(); $show_settings = (int) Str::startsWith($view->getName(), 'widgets.settings.'); } else { $html = (string) $view; $s...
CWE-79
1
private function updateModificationDate() { try { $modif_date = date('Y-m-d'); $update = $this->zdb->update(self::TABLE); $update->set( array('date_modif_adh' => $modif_date) )->where(self::PK . '=' . $this->_id); $edit = $this...
CWE-89
0
public function manage() { expHistory::set('viewable', $this->params); $page = new expPaginator(array( 'model'=>'order_status', 'where'=>1, 'limit'=>10, 'order'=>'rank', 'page'=>(isset($this->params['page']) ? $this->params['page'] : 1), 'control...
CWE-89
0
protected function assetExtensions() { return [ 'jpg', 'jpeg', 'bmp', 'png', 'webp', 'gif', 'ico', 'css', 'js', 'woff', 'woff2', 'svg', 'ttf', ...
CWE-22
2
public function activate_address() { global $db, $user; $object = new stdClass(); $object->id = $this->params['id']; $db->setUniqueFlag($object, 'addresses', $this->params['is_what'], "user_id=" . $user->id); flash("message", gt("Successfully updated address.")); ...
CWE-89
0
function nvweb_menu_load_routes() { global $DB; global $structure; global $current; global $website; if(empty($structure['routes'])) { $structure['routes'] = array(); $DB->query('SELECT object_id, path FROM nv_paths WHERE type = "structure" AND lang = '.protect($curre...
CWE-89
0
function scan($dir, $filter = '') { $path = FM_ROOT_PATH.'/'.$dir; $ite = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); $rii = new RegexIterator($ite, "/(".$filter.")/i"); $files = array(); foreach ($rii as $file) { if (!$file->isDir()) { $fileName = $f...
CWE-22
2
$this->params = $this->convertPartsToParams(); } elseif (isset($_SERVER['REQUEST_URI'])) { // if we hit here, we don't really need to do much. All the pertinent info will come thru in the POST/GET vars // so we don't really need to worry about what the URL looks like. ...
CWE-89
0
public function __construct($exceptions = false) { $this->exceptions = ($exceptions == true); }
CWE-79
1
private function getSwimlane() { $swimlane = $this->swimlaneModel->getById($this->request->getIntegerParam('swimlane_id')); if (empty($swimlane)) { throw new PageNotFoundException(); } return $swimlane; }
CWE-639
9
foreach ($cf_d as $cfd_i => $cfd_d) { if ($cfd_i == 'TYPE') { $fc = substr($cfd_d, 0, 1); $lc = substr($cfd_d, 1); $cfd_d = strtoupper($fc) . $lc; $get_schools_cf[$cf_i][$cfd_i] = $cfd_d; unset($fc); unse...
CWE-79
1
protected function _move($source, $targetDir, $name) { $target = $this->_joinPath($targetDir, $name); return $this->connect->rename($source, $target) ? $target : false; }
CWE-918
16
protected function _renderVarInput_number($form, &$var, &$vars) { $value = $var->getValue($vars); if ($var->type->getProperty('fraction')) { $value = sprintf('%01.' . $var->type->getProperty('fraction') . 'f', $value); } $linfo = Horde_Nls::getLocaleInfo(); /*...
CWE-79
1
public static function load_object_strings($node_type, $node_id, $node_uid=null) { global $DB; $DB->query(' SELECT subtype, lang, text FROM nv_webdictionary WHERE node_type = '.protect($node_type).' AND node_id = '.protect($node_id). (empty($node_uid)? '' : ' AND ( node_u...
CWE-89
0
public function save_change_password() { global $user; $isuser = ($this->params['uid'] == $user->id) ? 1 : 0; if (!$user->isAdmin() && !$isuser) { flash('error', gt('You do not have permissions to change this users password.')); expHistory::back(); } ...
CWE-89
0
public static function versionReport() { $v = self::latestVersion(); $html = " <div class=\"alert alert-warning\"> <span class=\"fa fa-warning\"></span> Warning: Your CMS version is different with our latest version (<strong>$v</strong>). Please upgrade your ...
CWE-89
0
public function getAuthority() { if (empty($this->host)) { return ''; } $authority = $this->host; if (!empty($this->userInfo)) { $authority = $this->userInfo . '@' . $authority; } if ($this->isNonStandardPort($this->scheme, $this->host, $...
CWE-89
0
public function testVersion() { $client = $this->getClientForAuthenticatedUser(User::ROLE_USER); $this->assertAccessIsGranted($client, '/api/version'); $result = json_decode($client->getResponse()->getContent(), true); $this->assertIsArray($result); $this->assertArrayHa...
CWE-1236
12
public static function country_region_name_by_code($code, $language="") { global $DB; // TODO: region names have no translation in database at this time // $lang = core_get_language($language); $DB->query('SELECT name FROM nv_countries_regions WHERE `numeric...
CWE-89
0
public function update_discount() { $id = empty($this->params['id']) ? null : $this->params['id']; $discount = new discounts($id); // find required shipping method if needed if ($this->params['required_shipping_calculator_id'] > 0) { $this->params['required_shipping_metho...
CWE-89
0
public function __construct () { if (self::existConf()) { # code... self::config('config'); self::lang(GX_LANG); }else{ GxMain::install(); } }
CWE-79
1
function ac_sigleid($name, $id) { global $cms_db, $sess; $sess->gc( true ); $ret = true; if( $id >= 1 ) { $ret = false; $cquery = sprintf("select count(*) from %s where user_id='%s' and name='%s'", $cms_db['sessions'], $id, ...
CWE-89
0
function GETPOST($paramname,$check='',$method=0) { if (empty($method)) $out = isset($_GET[$paramname])?$_GET[$paramname]:(isset($_POST[$paramname])?$_POST[$paramname]:''); elseif ($method==1) $out = isset($_GET[$paramname])?$_GET[$paramname]:''; elseif ($method==2) $out = isset($_POST[$paramname])?$_POST[$paramname]...
CWE-22
2
function MAX_adRenderImageBeacon($logUrl, $beaconId = 'beacon', $userAgent = null) { if (!isset($userAgent) && isset($_SERVER['HTTP_USER_AGENT'])) { $userAgent = $_SERVER['HTTP_USER_AGENT']; } $beaconId .= '_{random}'; // Add beacon image for logging if (isset($userAgent) && preg_match("#Moz...
CWE-79
1
public function update() { $project = $this->getProject(); $tag_id = $this->request->getIntegerParam('tag_id'); $tag = $this->tagModel->getById($tag_id); $values = $this->request->getValues(); list($valid, $errors) = $this->tagValidator->validateModification($values); ...
CWE-639
9
function getTextColumns($table) { $sql = "SHOW COLUMNS FROM " . $this->prefix.$table . " WHERE type = 'text' OR type like 'varchar%'"; $res = @mysqli_query($this->connection, $sql); if ($res == null) return array(); $records = array(); while($row = mysqli_fetch_object($res)) { $records[] = $ro...
CWE-89
0
public function string($skip_ajax = false) { if ($skip_ajax == true) { $url = $this->current($skip_ajax); } else { $url = false; } $u1 = implode('/', $this->segment(-1, $url)); // clear request params $cleanParam = new HTMLClean(); ...
CWE-79
1
public function confirm() { $project = $this->getProject(); $category = $this->getCategory(); $this->response->html($this->helper->layout->project('category/remove', array( 'project' => $project, 'category' => $category, ))); }
CWE-639
9
$link = str_replace(URL_FULL, '', makeLink(array('section' => $section->id)));
CWE-89
0
public function update() { $project = $this->getProject(); $values = $this->request->getValues(); list($valid, $errors) = $this->swimlaneValidator->validateModification($values); if ($valid) { if ($this->swimlaneModel->update($values['id'], $values)) { ...
CWE-639
9
public function checkAuthorisation($id, $user, $write) { // fetch the bare template $template = $this->find('first', array( 'conditions' => array('id' => $id), 'recursive' => -1, )); // if not found return false if (empty($template)) { ...
CWE-79
1
public function manage_versions() { expHistory::set('manageable', $this->params); $hv = new help_version(); $current_version = $hv->find('first', 'is_current=1'); $sql = 'SELECT hv.*, COUNT(h.title) AS num_docs FROM '.DB_TABLE_PREFIX.'_help h '; $sql .= 'RIGHT JOIN '.DB_TABLE_PREF...
CWE-89
0
public static function parseAndTrimExport($str, $isHTML = false) { //�Death from above�? � //echo "1<br>"; eDebug($str); $str = str_replace("�", "&rsquo;", $str); $str = str_replace("�", "&lsquo;", $str); $str = str_replace("�", "&#174;", $str); $str = str_replace("�", "-",...
CWE-89
0
public function disable() { $this->checkCSRFParam(); $project = $this->getProject(); $swimlane_id = $this->request->getIntegerParam('swimlane_id'); if ($this->swimlaneModel->disable($project['id'], $swimlane_id)) { $this->flash->success(t('Swimlane updated successful...
CWE-639
9
$arrDetail['total_price'] = sc_currency_value($cartItem->price) * $cartItem->qty; $arrCartDetail[] = $arrDetail; } //Set session info order session(['dataOrder' => $dataOrder]); session(['arrCartDetail' => $arrCartDetail]); //Create new order ...
CWE-79
1
public function upload() { // upload the file, but don't save the record yet... if ($this->params['resize'] != 'false') { $maxwidth = $this->params['max_width']; } else { $maxwidth = null; } $file = expFile::fileUpload('Filedata',false,false,n...
CWE-89
0
public function get($key, $default = null, $deep = false) { if ($deep) { @trigger_error('Using paths to find deeper items in '.__METHOD__.' is deprecated since version 2.8 and will be removed in 3.0. Filter the returned value in your own code instead.', E_USER_DEPRECATED); } ...
CWE-89
0
public function getTestData() { return [ [[], 'Kimai - ' . Constants::VERSION . ' ' . Constants::STATUS . ' (' . Constants::NAME . ') by Kevin Papst and contributors.'], [['--name' => true], Constants::NAME], [['--candidate' => true], Constants::STATUS], [...
CWE-1236
12
public function configure() { $this->config['defaultbanner'] = array(); if (!empty($this->config['defaultbanner_id'])) { $this->config['defaultbanner'][] = new expFile($this->config['defaultbanner_id']); } parent::configure(); $banners = $this->banner->find('all', nul...
CWE-89
0
public function remove() { $this->checkCSRFParam(); $project = $this->getProject(); $category = $this->getCategory(); if ($this->categoryModel->remove($category['id'])) { $this->flash->success(t('Category removed successfully.')); } else { $this->...
CWE-639
9
public function enable() { $this->checkCSRFParam(); $project = $this->getProject(); $swimlane_id = $this->request->getIntegerParam('swimlane_id'); if ($this->swimlaneModel->enable($project['id'], $swimlane_id)) { $this->flash->success(t('Swimlane updated successfully...
CWE-639
9
private function getTaskLink() { $link = $this->taskLinkModel->getById($this->request->getIntegerParam('link_id')); if (empty($link)) { throw new PageNotFoundException(); } return $link; }
CWE-639
9
protected function _copy($source, $targetDir, $name) { $res = false; if ($this->tmp) { $local = $this->getTempFile(); $target = $this->_joinPath($targetDir, $name); if (ftp_get($this->connect, $local, $source, FTP_BINARY) && ftp_put($this->connect, $target, $local, $this->ftpMode($target))) { ...
CWE-89
0
private function getTaskLink() { $link = $this->taskLinkModel->getById($this->request->getIntegerParam('link_id')); if (empty($link)) { throw new PageNotFoundException(); } return $link; }
CWE-639
9
public function manage() { expHistory::set('manageable', $this->params); // build out a SQL query that gets all the data we need and is sortable. $sql = 'SELECT b.*, c.title as companyname, f.expfiles_id as file_id '; $sql .= 'FROM '.DB_TABLE_PREFIX.'_banner b, '.DB_TABLE_P...
CWE-89
0
protected function parseChunkedRequest(Request $request) { $totalChunkCount = $request->get('dztotalchunkcount'); $index = $request->get('dzchunkindex'); $last = ((int) $index + 1) === (int) $totalChunkCount; $uuid = $request->get('dzuuid'); /** * @var UploadedF...
CWE-22
2
public function testConstructor() { $dompdf = new Dompdf(); $this->assertInstanceOf(CPDF::class, $dompdf->getCanvas()); $this->assertSame("", $dompdf->getProtocol()); $this->assertSame("", $dompdf->getBaseHost()); $this->assertSame("", $dompdf->getBasePath()); $th...
CWE-918
16
public function confirm() { $project = $this->getProject(); $swimlane = $this->getSwimlane(); $this->response->html($this->helper->layout->project('swimlane/remove', array( 'project' => $project, 'swimlane' => $swimlane, ))); }
CWE-639
9
protected function _filePutContents($path, $content) { return $this->query(sprintf('UPDATE %s SET content="%s", size=%d, mtime=%d WHERE id=%d LIMIT 1', $this->tbf, $this->db->real_escape_string($content), strlen($content), time(), $path)); }
CWE-89
0
$dt = date('Y-m-d', strtotime($match)); $sql = par_rep("/'$match'/", "'$dt'", $sql); } } if (substr($sql, 0, 6) == "BEGIN;") { $array = explode(";", $sql); foreach ($array as $value) { if ($value != "") { $result = $connection->query($value); if (!$result) { $connecti...
CWE-79
1
public function afterSave($event) { // look up current tags $oldTags = $this->getTags(); $newTags = array(); foreach ($this->scanForTags() as $tag) { if (!in_array($tag, $oldTags)) { // don't add duplicates if there are already tags $tagModel = new Tags; ...
CWE-79
1
foreach ($day as $extevent) { $event_cache = new stdClass(); $event_cache->feed = $extgcalurl; $event_cache->event_id = $extevent->event_id; $event_cache->title = $extevent->title; ...
CWE-89
0
public function rename(){ if($this->request->isMethod('POST')){ $new_file = $this->request->input('new_file'); if(!\Security::isExecutable($new_file) && \Storage::move($this->request->input('old_file'), $new_file)){ if($this->request->ajax()){ r...
CWE-434
5
public function __construct () { global $vars; if(DB_DRIVER == 'mysql') { mysql_connect(DB_HOST, DB_USER, DB_PASS); mysql_select_db(DB_NAME); }elseif(DB_DRIVER == 'mysqli') { try { self::$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS...
CWE-89
0
public static function theme($var, $data='') { if (isset($data)) { # code... $GLOBALS['data'] = $data; } if (self::exist($var)) { include(GX_THEME.THEME.'/'.$var.'.php'); }else{ Control::error('unknown','Theme file is missing.')...
CWE-89
0
public function backup($type='json') { global $DB; global $website; $out = array(); $DB->query('SELECT * FROM nv_webdictionary WHERE website = '.protect($website->id), 'object'); if($type='json') $out = json_encode($DB->result()); retur...
CWE-89
0
public function __construct(){ }
CWE-79
1
function clone(array $override_input = [], bool $history = true) { global $DB, $CFG_GLPI; if ($DB->isSlave()) { return false; } $new_item = new static(); $input = $this->fields; foreach ($override_input as $key => $value) { $input[$key] = $value; } $...
CWE-89
0
public function getQuerySelect() { $R2 = 'R2_' . $this->id; return "$R2.value AS `" . $this->name . "`"; }
CWE-89
0
static function validUTF($string) { if(!mb_check_encoding($string, 'UTF-8') OR !($string === mb_convert_encoding(mb_convert_encoding($string, 'UTF-32', 'UTF-8' ), 'UTF-8', 'UTF-32'))) { return false; } return true; }
CWE-89
0
public function getQuerySelect() { $R1 = 'R1_' . $this->field->id; $R2 = 'R2_' . $this->field->id; $R3 = 'R3_' . $this->field->id; return "$R2.id AS `" . $this->field->name . "`"; }
CWE-89
0
public static function calculate_object_score($object, $object_id) { global $DB; global $website; $DB->query('SELECT COUNT(*) as votes, SUM(value) as score FROM nv_webuser_votes WHERE object_id = '.protect($object_id).' AND object = '.protect($object).' AND website = '...
CWE-89
0
public function beforeFilter() { parent::beforeFilter(); $this->Security->unlockedActions = array_merge($this->Security->unlockedActions, array('setHomePage')); }
CWE-79
1
public function search_external() { // global $db, $user; global $db; $sql = "select DISTINCT(a.id) as id, a.source as source, a.firstname as firstname, a.middlename as middlename, a.lastname as lastname, a.organization as organization, a.email as email "; $sql .= "from " . $db->pref...
CWE-89
0
$link_text = wp_get_attachment_image( $_post->ID, $size, $icon, $attr ); } else { $link_text = ''; } if ( trim( $link_text ) == '' ) $link_text = $_post->post_title; /** * Filters a retrieved attachment page link. * * @since 2.7.0 * * @param string $link_html The page link HTML output. * @...
CWE-79
1
public static function getLatestVersion ($now) { $v = file_get_contents("https://raw.githubusercontent.com/semplon/GeniXCMS/master/VERSION"); $arr = array( 'version' => trim($v), 'last_check' => $now ); $arr = json_encode($arr); ...
CWE-89
0
public function isAllowedFilename($filename){ $allow_array = array( '.jpg','.jpeg','.png','.bmp','.gif','.ico','.webp', '.mp3','.wav','.m4a','.ogg','.webma','.mp4','.flv', '.mov','.webmv','.m3u8a','.flac','.mkv', '.zip','.tar','.gz','.tgz','.ipa','.apk','.rar','.iso','.bz2','.epub', '.pdf','.ofd','.sw...
CWE-79
1
public function isAllowedFilename($filename){ $allow_array = array( '.jpg','.jpeg','.png','.bmp','.gif','.ico','.webp', '.mp3','.wav','.mp4', '.mov','.webmv','.flac','.mkv', '.zip','.tar','.gz','.tgz','.ipa','.apk','.rar','.iso', '.pdf','.ofd','.swf','.epub','.xps', '.doc','.docx','.wps', '.ppt'...
CWE-79
1
$res = @unserialize ( base64_decode (str_replace ( array ( "|02" , "|01" ) , array ( "/" , "|" ) , $str ) ) ) ;
CWE-502
15