code stringlengths 12 2.05k | label_name stringlengths 6 8 | label int64 0 95 |
|---|---|---|
public static function canImportData() {
return true;
}
| CWE-89 | 0 |
protected function _dimensions($path, $mime) {
if (strpos($mime, 'image') !== 0) return '';
$cache = $this->getDBdat($path);
if (isset($cache['width']) && isset($cache['height'])) {
return $cache['width'].'x'.$cache['height'];
}
$ret = '';
if ($work = $this->getWorkFile($path)) {
if ($size = @getimag... | CWE-89 | 0 |
function doc_link($paths, $text = "<sup>?</sup>") {
global $jush, $connection;
$server_info = $connection->server_info;
$version = preg_replace('~^(\d\.?\d).*~s', '\1', $server_info); // two most significant digits
$urls = array(
'sql' => "https://dev.mysql.com/doc/refman/$version/en/",
'sqlite' => "https://www... | CWE-79 | 1 |
public function showall() {
expHistory::set('viewable', $this->params);
$limit = (isset($this->config['limit']) && $this->config['limit'] != '') ? $this->config['limit'] : 10;
if (!empty($this->params['view']) && ($this->params['view'] == 'showall_accordion' || $this->params['view'] == 'show... | CWE-89 | 0 |
public function newModel() {
return new APIModel('testuser','5f4dcc3b5aa765d61d8327deb882cf99',rtrim(TEST_BASE_URL,'/'));
} | CWE-79 | 1 |
function edit() {
global $template;
parent::edit();
$allforms = array();
$allforms[""] = gt('Disallow Feedback');
// calculate which event date is the one being edited
$event_key = 0;
foreach ($template->tpl->tpl_vars['record']->value->eventdate as $k... | CWE-89 | 0 |
function edit() {
if (empty($this->params['content_id'])) {
flash('message',gt('An error occurred: No content id set.'));
expHistory::back();
}
/* The global constants can be overridden by passing appropriate params */
//sure wish I could do this once in the constructo... | CWE-89 | 0 |
function db_start()
{
global $DatabaseServer, $DatabaseUsername, $DatabasePassword, $DatabaseName, $DatabasePort, $DatabaseType;
switch ($DatabaseType) {
case 'mysqli':
$connection = new mysqli($DatabaseServer, $DatabaseUsername, $DatabasePassword, $DatabaseName, $DatabasePort);
... | CWE-22 | 2 |
public function testCheckLoginPassEntity()
{
$login=checkLoginPassEntity('loginbidon', 'passwordbidon', 1, array('dolibarr'));
print __METHOD__." login=".$login."\n";
$this->assertEquals($login, '');
$login=checkLoginPassEntity('admin', 'passwordbidon', 1, array('dolibarr'));
... | CWE-88 | 3 |
$ins = array(
'table' => 'options',
'key' => array(
'name' => $name,
'value' => $value
)
);
$opt = Db::insert($ins);
... | CWE-89 | 0 |
public static function getHelpVersion($version_id) {
global $db;
return $db->selectValue('help_version', 'version', 'id="'.$version_id.'"');
} | CWE-89 | 0 |
$result = $search->getSearchResults($item->query, false, true);
if(empty($result) && !in_array($item->query, $badSearchArr)) {
$badSearchArr[] = $item->query;
$badSearch[$ctr2]['query'] = $item->query;
$badSearch[$ctr2]['count'] = $db->countObjects("search_queries", "query='{$item->query}'");
$ct... | CWE-89 | 0 |
function draw_cdef_preview($cdef_id) {
?>
<tr class='even'>
<td style='padding:4px'>
<pre>cdef=<?php print get_cdef($cdef_id, true);?></pre>
</td>
</tr>
<?php
} | CWE-79 | 1 |
static function convertUTF($string) {
return $string = str_replace('?', '', htmlspecialchars($string, ENT_IGNORE, 'UTF-8'));
} | CWE-89 | 0 |
public function getPurchaseOrderByJSON() {
if(!empty($this->params['vendor'])) {
$purchase_orders = $this->purchase_order->find('all', 'vendor_id=' . $this->params['vendor']);
} else {
$purchase_orders = $this->purchase_order->find('all');
}
echo json_encode($purchase_orders);
} | CWE-89 | 0 |
$cols .= '\'' . Util::sqlAddSlashes($col_select) . '\',';
}
$cols = trim($cols, ',');
$has_list = PMA_findExistingColNames($db, $cols);
foreach ($field_select as $column) {
if (!in_array($column, $has_list)) {
$colNotExist[] = "'" . $column . "'";
... | CWE-89 | 0 |
function getDeviceID($useRandomString = true) {
$ip = md5(getRealIpAddr());
if (empty($_SERVER['HTTP_USER_AGENT'])) {
$device = "unknowDevice-{$ip}";
$device .= '-' . intval(User::getId());
return $device;
}
if (empty($useRandomString)) {
$device = 'ypt-' . get_browser_n... | CWE-79 | 1 |
public function delete()
{
global $DB;
$node_id_filter = "";
// remove all old entries
if(!empty($this->node_id))
{
if(is_numeric($this->node_id))
$node_id_filter .= ' AND node_id = '.intval($this->node_id);
if(is_numeric($this->node_uid))
... | CWE-89 | 0 |
function new_pass_form()
{
pagetop(gTxt('tab_site_admin'), '');
echo form(
hed(gTxt('change_password'), 2).
inputLabel(
'new_pass',
fInput('password', 'new_pass', '', '', '', '', INPUT_REGULAR, '', 'new_pass'),
'new_password', '', array('class' => 'txp-form-f... | CWE-521 | 4 |
public function findAddress(App\Request $request)
{
$instance = \App\Map\Address::getInstance($request->getByType('type'));
$response = new Vtiger_Response();
if ($instance) {
$response->setResult($instance->find($request->getByType('value', 'Text')));
}
$response->emit();
} | CWE-434 | 5 |
protected function _restoreDb($data)
{
if (empty($data['Tool']['backup']['tmp_name'])) {
return false;
}
$tmpPath = TMP . 'schemas' . DS;
$targetPath = $tmpPath . $data['Tool']['backup']['name'];
if (!move_uploaded_file($data['Tool']['backup']['tmp_name'], $targetPath)) {
return false;
}
/* ZI... | CWE-78 | 6 |
public function __construct(string $user = null, string $field = 'id') {
$this->_db = DB::getInstance();
$this->_sessionName = Config::get('session.session_name');
$this->_cookieName = Config::get('remember.cookie_name');
$this->_admSessionName = Config::get('session.admin_name');
... | CWE-613 | 7 |
public static function parseAndTrim($str, $isHTML = false) { //�Death from above�? �
//echo "1<br>"; eDebug($str);
// global $db;
$str = str_replace("�", "’", $str);
$str = str_replace("�", "‘", $str);
$str = str_replace("�", "®", $str);
$str = str_re... | CWE-89 | 0 |
public function createFromBill(Request $request, Bill $bill)
{
$request->session()->flash('info', (string)trans('firefly.instructions_rule_from_bill', ['name' => $bill->name]));
$this->createDefaultRuleGroup();
$this->createDefaultRule();
$preFilled = [
'strict' ... | CWE-79 | 1 |
public function getFileAndFolderNameFilters()
{
return $this->fileAndFolderNameFilters;
} | CWE-319 | 8 |
static function description() {
return gt("This module is for managing categories in your store.");
} | CWE-89 | 0 |
public function getFilesInFolder(Folder $folder, $start = 0, $maxNumberOfItems = 0, $useFilters = true, $recursive = false, $sort = '', $sortRev = false)
{
$this->assureFolderReadPermission($folder);
$rows = $this->getFileIndexRepository()->findByFolder($folder);
$filters = $useFilters... | CWE-319 | 8 |
foreach($fields as $field)
{
if(substr($key, 0, strlen($field.'-'))==$field.'-')
{
$this->dictionary[substr($key, strlen($field.'-'))][$field] = $value;
}
}
| CWE-79 | 1 |
function build_daterange_sql($timestamp, $endtimestamp=null, $field='date', $multiday=false) {
if (empty($endtimestamp)) {
$date_sql = "((".$field." >= " . expDateTime::startOfDayTimestamp($timestamp) . " AND ".$field." <= " . expDateTime::endOfDayTimestamp($timestamp) . ")";
} else {... | CWE-89 | 0 |
$controller = new $ctlname();
if (method_exists($controller,'isSearchable') && $controller->isSearchable()) {
// $mods[$controller->name()] = $controller->addContentToSearch();
$mods[$controller->searchName()] = $controller->addContentToSearch();
}
}
uksort($mods,'str... | CWE-89 | 0 |
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 |
foreach ($days as $event) {
if (empty($event->eventdate->date) || ($viewrange == 'upcoming' && $event->eventdate->date < time()))
break;
if (empty($event->eventstart))
$eve... | CWE-89 | 0 |
public function show()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$this->response->html($this->template->render('subtask_restriction/show', array(
'status_list' => array(
SubtaskModel::STATUS_TODO => t('Todo'),
SubtaskModel::S... | CWE-639 | 9 |
function rsvpmaker_relay_menu_pages() {
$parent_slug = 'edit.php?post_type=rsvpemail';
add_submenu_page(
$parent_slug,
__( 'Group Email', 'rsvpmaker' ),
__( 'Group Email', 'rsvpmaker' ),
'manage_options',
'rsvpmaker_relay_manual_test',
'rsvpmaker_relay_manual_test'
);
add_submenu_page(
$parent_slug,... | CWE-89 | 0 |
public static function dropdown($vars){
if(is_array($vars)){
//print_r($vars);
$name = $vars['name'];
$where = "WHERE ";
if(isset($vars['type'])) {
$where .= " `type` = '{$vars['type']}' AND ";
}else{
$where .= " ";
... | CWE-79 | 1 |
public static function create($vars) {
if(is_array($vars)){
//print_r($vars['user']);
$u = $vars['user'];
$sql = array(
'table' => 'user',
'key' => $u,
);
$db... | CWE-89 | 0 |
foreach ($this->_to_convert as $error) {
$message = $this->getMessage($error['field'], $error['rule'], $error['fallback']);
// If there is no generic `message()` set or the translated message is not equal to generic message
// we can continue without worrying about duplicat... | CWE-304 | 10 |
public static function loadFromPath($path)
{
$instance = new self();
$instance->name = basename($path);
$instance->path = $path;
return $instance;
} | CWE-79 | 1 |
function nvweb_webuser_generate_username($email)
{
global $DB;
global $website;
// generate a valid username
// try to get the left part of the email address, except if it is a common account name
$username = strtolower(substr($email, 0, strpos($email, '@'))); // left part of the email
... | CWE-89 | 0 |
public static function generatePass(){
$vars = microtime().Site::$name.rand();
$hash = sha1($vars.SECURITY_KEY);
$pass = substr($hash, 5, 8);
return $pass;
}
| CWE-89 | 0 |
public function getQuerySelect()
{
$R1 = 'R1_' . $this->id;
$R2 = 'R2_' . $this->id;
return "$R2.value AS `" . $this->name . "`";
} | CWE-89 | 0 |
public function actionAppendTag() {
if (isset($_POST['Type'], $_POST['Id'], $_POST['Tag']) &&
preg_match('/^[\w\d_-]+$/', $_POST['Type'])) {
if (!class_exists($_POST['Type'])) {
echo 'false';
return;
}
$model = X2Model::mod... | CWE-79 | 1 |
public function confirm()
{
$task = $this->getTask();
$comment = $this->getComment();
$this->response->html($this->template->render('comment/remove', array(
'comment' => $comment,
'task' => $task,
'title' => t('Remove a comment')
)));
} | CWE-639 | 9 |
public function confirm()
{
$project = $this->getProject();
$tag_id = $this->request->getIntegerParam('tag_id');
$tag = $this->tagModel->getById($tag_id);
$this->response->html($this->template->render('project_tag/remove', array(
'tag' => $tag,
'proje... | CWE-639 | 9 |
protected function shouldRedirect(Request $request, Shop $shop)
{
return //for example: template preview, direct shop selection via url
(
$request->isGet()
&& $request->getQuery('__shop') !== null
&& $request->getQuery('__shop') != $shop->getId... | CWE-601 | 11 |
public function renderRequest()
{
$request = '';
foreach ($this->displayVars as $name) {
if (!empty($GLOBALS[$name])) {
$request .= '$' . $name . ' = ' . VarDumper::export($GLOBALS[$name]) . ";\n\n";
}
}
return '<pre>' . rtrim($request, "\... | CWE-79 | 1 |
public function getInvalidPaths()
{
return array(
array('foo[['),
array('foo[d'),
array('foo[bar]]'),
array('foo[bar]d'),
);
} | CWE-89 | 0 |
function selectObjectBySql($sql) {
//$logFile = "C:\\xampp\\htdocs\\supserg\\tmp\\queryLog.txt";
//$lfh = fopen($logFile, 'a');
//fwrite($lfh, $sql . "\n");
//fclose($lfh);
$res = @mysqli_query($this->connection, $this->injectProof($sql));
if ($re... | CWE-89 | 0 |
public function remove()
{
$project = $this->getProject();
$this->checkCSRFParam();
$column_id = $this->request->getIntegerParam('column_id');
if ($this->columnModel->remove($column_id)) {
$this->flash->success(t('Column removed successfully.'));
} else {
... | CWE-639 | 9 |
public function getQuerySelect()
{
//Last update date is stored in the changeset (the date of the changeset)
return "c.submitted_on AS `" . $this->name . "`";
} | CWE-89 | 0 |
public static function getParent($parent='', $menuid = ''){
if(isset($menuid)){
$where = " AND `menuid` = '{$menuid}'";
}else{
$where = '';
}
$sql = sprintf("SELECT * FROM `menus` WHERE `parent` = '%s' %s", $parent, $where);
$menu = Db::result($sql);
... | CWE-79 | 1 |
private function filterPort($scheme, $host, $port)
{
if (null !== $port) {
$port = (int) $port;
if (1 > $port || 0xffff < $port) {
throw new \InvalidArgumentException(
sprintf('Invalid port: %d. Must be between 1 and 65535', $port)
... | CWE-89 | 0 |
$sloc = expCore::makeLocation('navigation', null, $section->id);
// remove any manage permissions for this page and it's children
// $db->delete('userpermission', "module='navigationController' AND internal=".$section->id);
// $db->delete('grouppermission', "module='na... | CWE-89 | 0 |
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-89 | 0 |
public function remove()
{
$project = $this->getProject();
$this->checkCSRFParam();
$column_id = $this->request->getIntegerParam('column_id');
if ($this->columnModel->remove($column_id)) {
$this->flash->success(t('Column removed successfully.'));
} else {
... | CWE-639 | 9 |
public static function isHadSub($parent, $menuid =''){
$sql = sprintf("SELECT * FROM `menus` WHERE `parent` = '%s' %s", $parent, $where);
} | CWE-89 | 0 |
function reset_stats() {
// global $db;
// reset the counters
// $db->sql ('UPDATE '.$db->prefix.'banner SET impressions=0 WHERE 1');
banner::resetImpressions();
// $db->sql ('UPDATE '.$db->prefix.'banner SET clicks=0 WHERE 1');
banner::resetClicks();
/... | CWE-89 | 0 |
function edit_optiongroup_master() {
expHistory::set('editable', $this->params);
$id = isset($this->params['id']) ? $this->params['id'] : null;
$record = new optiongroup_master($id);
assign_to_template(array(
'record'=>$record
));
} | CWE-89 | 0 |
public function SetFrom($address, $name = '', $auto = 1) {
$address = trim($address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
if (!$this->ValidateAddress($address)) {
$this->SetError($this->Lang('invalid_address').': '. $address);
if ($this->exceptions) {
... | CWE-79 | 1 |
foreach ($value_arr['ENROLLMENT_INFO'] as $eid => $ed) {
echo '<ENROLLMENT_INFO_' . htmlentities($eid) . '>';
echo '<SCHOOL_ID>' . htmlentities($ed['SCHOOL_ID']) . '</SCHOOL_ID>';
echo '<CALENDAR>' . htmlentities... | CWE-22 | 2 |
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
$io->title('Kimai installation running ...');
/** @var Application $application */
$application = $this->getApplication();
/** @var KernelInterface $ker... | CWE-1236 | 12 |
public function clear($id)
{
if ($this->securityController->isWikiHibernated()) {
throw new \Exception(_t('WIKI_IN_HIBERNATION'));
}
$this->dbService->query(
'DELETE FROM' . $this->dbService->prefixTable('acls') .
'WHERE page_tag IN (SELECT tag FROM ' ... | CWE-89 | 0 |
public static function connect ($dbhost=DB_HOST, $dbuser=DB_USER,
$dbpass=DB_PASS, $dbname=DB_NAME) {
self::$mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
if (self::$mysqli->connect_error) {
return false;
}else{
return tru... | CWE-89 | 0 |
function delete_option_master() {
global $db;
$masteroption = new option_master($this->params['id']);
// delete any implementations of this option master
$db->delete('option', 'option_master_id='.$masteroption->id);
$masteroption->delete('optiongroup_master_id=' . $... | CWE-89 | 0 |
public function show()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$this->response->html($this->template->render('subtask_converter/show', array(
'subtask' => $subtask,
'task' => $task,
)));
} | CWE-639 | 9 |
public function getQuerySelect()
{
return '';
} | CWE-89 | 0 |
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 |
} elseif (!empty($this->params['src'])) {
if ($this->params['src'] == $loc->src) {
$this->config = $config->config;
break;
}
}
}
| CWE-89 | 0 |
public function autocomplete() {
return;
global $db;
$model = $this->params['model'];
$mod = new $model();
$srchcol = explode(",",$this->params['searchoncol']);
/*for ($i=0; $i<count($srchcol); $i++) {
if ($i>=1) $sql .= " OR ";
$sql .= $srchc... | CWE-89 | 0 |
public static function getHelpVersion($version_id) {
global $db;
return $db->selectValue('help_version', 'version', 'id="'.$version_id.'"');
} | CWE-89 | 0 |
public function get($columns = ['*'])
{
if (!is_null($this->cacheMinutes)) {
$results = $this->getCached($columns);
}
else {
$results = $this->getFresh($columns);
}
$models = $this->getModels($results ?: []);
return $this->model->newColle... | CWE-22 | 2 |
function initEnv() {
$iParams = array("reqURI" => array(tlInputParameter::STRING_N,0,4000));
$pParams = G_PARAMS($iParams);
$args = new stdClass();
$args->ssodisable = getSSODisable();
// CWE-79:
// Improper Neutralization of Input
// During Web Page Generation ('Cross-site Scripting')
//
// ht... | CWE-79 | 1 |
function download_item($dir, $item)
{
// Security Fix:
$item=basename($item);
if (!permissions_grant($dir, $item, "read"))
show_error($GLOBALS["error_msg"]["accessfunc"]);
if (!get_is_file($dir,$item))
{
_debug("error download");
show_error($item.": ".$GLOBALS["error_msg"]["fileexist"]);
... | CWE-22 | 2 |
public function __construct() {
}
| CWE-89 | 0 |
public static function BBCode2Html($text) {
$text = trim($text);
$text = self::parseEmoji($text);
// Smileys to find...
$in = array(
);
// And replace them by...
$out = array(
);
$in[] = '[/*]';
$in[] = '[*]';
$out[] = '</li>';
$out[]... | 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 |
function PMA_getUrlParams(
$what, $reload, $action, $db, $table, $selected, $views,
$original_sql_query, $original_url_query
) {
$_url_params = array(
'query_type' => $what,
'reload' => (! empty($reload) ? 1 : 0),
);
if (mb_strpos(' ' . $action, 'db_') == 1) {
$_url_params['d... | CWE-79 | 1 |
public static function desc($vars){
if(!empty($vars)){
$desc = substr(strip_tags(htmlspecialchars_decode($vars).". ".Options::get('sitedesc')),0,150);
}else{
$desc = substr(Options::get('sitedesc'),0,150);
}
return $desc;
} | CWE-79 | 1 |
$comments->records[$key]->avatar = $db->selectObject('user_avatar',"user_id='".$record->poster."'");
}
if (empty($this->params['config']['disable_nested_comments'])) $comments->records = self::arrangecomments($comments->records);
// eDebug($sql, true);
// count the ... | CWE-89 | 0 |
static function convertUTF($string) {
return $string = str_replace('?', '', htmlspecialchars($string, ENT_IGNORE, 'UTF-8'));
} | CWE-89 | 0 |
foreach ($grpusers as $u) {
$emails[$u->email] = trim(user::getUserAttribution($u->id));
}
| CWE-89 | 0 |
public function update() {
//populate the alt tag field if the user didn't
if (empty($this->params['alt'])) $this->params['alt'] = $this->params['title'];
// call expController update to save the image
parent::update();
} | CWE-89 | 0 |
function productFeed() {
// global $db;
//check query password to avoid DDOS
/*
* condition = new
* description
* id - SKU
* link
* price
* title
* brand - manufacturer
... | CWE-89 | 0 |
$user = db_fetch_cell_prepared('SELECT username FROM user_auth WHERE id = ?', array($check['user']), 'username');
form_alternate_row('line' . $check['id']);
$name = get_data_source_title($check['datasource']);
$title = $name;
if (strlen($name) > 50) {
$name = substr($name, 0, 50);
}
form_select... | CWE-79 | 1 |
public function getQuerySelect()
{
$R1 = 'R1_' . $this->field->id;
$R2 = 'R2_' . $this->field->id;
$R3 = 'R3_' . $this->field->id;
return "$R2.user_id AS `" . $this->field->name . "`";
} | CWE-89 | 0 |
public function update($key, $qty) {
if ((int)$qty && ((int)$qty > 0)) {
$this->session->data['cart'][$key] = (int)$qty;
} else {
$this->remove($key);
}
$this->data = array();
} | CWE-611 | 13 |
$contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_SAVE, 'fas fa-save', null, 'primary', null, 'btn-success xxx text-white mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('customer_data_groups.php', 'page=' . $_GET['page']), null, null, 'btn-light')]; | CWE-79 | 1 |
$newret = recyclebin::restoreFromRecycleBin($iLoc, $page_id);
if (!empty($newret)) $ret .= $newret . '<br>';
if ($iLoc->mod == 'container') {
$ret .= scan_container($container->internal, $page_id);
}
}
retu... | CWE-89 | 0 |
foreach( $zones as $id => $zone )
{
//print_r($zone);
/**
* Only get timezones explicitely not part of "Others".
* @see http://www.php.net/manual/en/timezones.others.php
*/
if ( preg_match( ... | CWE-89 | 0 |
public function getItemLink(&$icmsObj, $onlyUrl=false) {
/**
* @todo URL Rewrite feature is not finished yet...
*/
//$seoMode = smart_getModuleModeSEO($this->handler->_moduleName);
//$seoModuleName = smart_getModuleNameForSEO($this->handler->_moduleName);
$seoMode = false;
$seoModuleName = $this... | CWE-22 | 2 |
public static function getHelpVersionId($version) {
global $db;
return $db->selectValue('help_version', 'id', 'version="'.$version.'"');
} | CWE-89 | 0 |
$context['clockicons'] = unserialize(base64_decode('YTozOntzOjE6ImgiO2E6NTp7aTowO2k6MTY7aToxO2k6ODtpOjI7aTo0O2k6MztpOjI7aTo0O2k6MTt9czoxOiJtIjthOjY6e2k6MDtpOjMyO2k6MTtpOjE2O2k6MjtpOjg7aTozO2k6NDtpOjQ7aToyO2k6NTtpOjE7fXM6MToicyI7YTo2OntpOjA7aTozMjtpOjE7aToxNjtpOjI7aTo4O2k6MztpOjQ7aTo0O2k6MjtpOjU7aToxO319'));
} | CWE-94 | 14 |
public function showall() {
global $user, $sectionObj, $sections;
expHistory::set('viewable', $this->params);
$id = $sectionObj->id;
$current = null;
// all we need to do is determine the current section
$navsections = $sections;
if ($sectionObj-... | CWE-89 | 0 |
public function thumbnailTreeAction()
{
$this->checkPermission('thumbnails');
$thumbnails = [];
$list = new Asset\Image\Thumbnail\Config\Listing();
$groups = [];
foreach ($list->getThumbnails() as $item) {
if ($item->getGroup()) {
if (empty(... | 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-79 | 1 |
public static function getParent($parent='', $menuid = ''){
if(isset($menuid)){
$where = " AND `menuid` = '{$menuid}'";
}else{
$where = '';
}
$sql = sprintf("SELECT * FROM `menus` WHERE `parent` = '%s' %s", $parent, $where);
$menu = Db::result($sql);
... | CWE-89 | 0 |
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-89 | 0 |
public function showall() {
expHistory::set('viewable', $this->params);
$hv = new help_version();
//$current_version = $hv->find('first', 'is_current=1');
$ref_version = $hv->find('first', 'version=\''.$this->help_version.'\'');
// pagination parameter..hard coded for now.
$where = ... | CWE-89 | 0 |
public static function attach($hooks_name, $func) {
$hooks = self::$hooks;
$hooks[$hooks_name][] = $func;
self::$hooks = $hooks;
return self::$hooks;
}
| CWE-89 | 0 |
public function save()
{
global $DB;
// remove all old entries
$node_id_filter = '';
if(!empty($this->node_id))
{
if(is_numeric($this->node_id))
$node_id_filter .= ' AND node_id = '.intval($this->node_id);
if(is_numeric($this->node_uid))
$node_id_filter .= ' AND node_uid ... | CWE-89 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.