code
stringlengths
23
2.05k
label_name
stringlengths
6
7
label
int64
0
37
Variables::setVar( [ '', '', $variable, $value ] ); if ( defined( 'ExtVariables::VERSION' ) ) { \ExtVariables::get( $this->parser )->setVarValue( $variable, $value ); } } }
CWE-400
2
private function runCallback() { foreach ($this->records as &$record) { if (isset($record->ref_type)) { $refType = $record->ref_type; if (class_exists($record->ref_type)) { $type = new $refType(); $classinfo = new Reflection...
CWE-74
1
static function displayname() { return "Events"; }
CWE-74
1
public function checkHTTP($link, $get_body = false) { if (! function_exists('curl_init')) { return null; } $handle = curl_init($link); if ($handle === false) { return null; } PMA_Util::configureCurl($handle); curl_setopt($handle, CU...
CWE-20
0
public function testGetEventsPublicProfile(){ TestingAuxLib::loadX2NonWebUser (); TestingAuxLib::suLogin ('testuser'); Yii::app()->settings->historyPrivacy = null; $lastEventId=0; $lastTimestamp=0; $myProfile = Profile::model()->findByAttributes(array('username' => '...
CWE-20
0
$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-74
1
public static function getItems($term) { $model = X2Model::model(Yii::app()->controller->modelClass); if (isset($model)) { $tableName = $model->tableName(); $sql = 'SELECT id, name as value FROM ' . $tableName . ' WHERE name LIKE :qterm ORDER BY name ASC'; ...
CWE-20
0
public function save_user() { if ( empty( $_POST['user_id'] ) ) { return false; } $user_id = $_POST['user_id']; if ( !is_numeric( $user_id ) ) { return $user_id; } if ( !current_user_can( 'edit_user', $user_id ) ) { return $user_id; } return $this->save_posted_object_locatio...
CWE-20
0
static function convertUTF($string) { return $string = str_replace('?', '', htmlspecialchars($string, ENT_IGNORE, 'UTF-8')); }
CWE-74
1
private static function retrieveClosurePattern($pure, $closureName) { $pattern = '/'; if (!$pure) { $pattern .= preg_quote(self::$registeredDelimiters[0]) . "\s*"; } $pattern .= "$closureName\(([a-z0-9,\.\s]+)\)"; if (!$pure) { $pattern .= "\s*" . ...
CWE-74
1
$query->whereExists(function ($permissionQuery) use (&$tableDetails, $action) { /** @var Builder $permissionQuery */ $permissionQuery->select(['role_id'])->from('joint_permissions') ->whereColumn('joint_permissions.entity_id', '=', $tableDetails['tableName...
CWE-863
11
$tokens = preg_split( '/ - */', $title ); $newKey = ''; foreach ( $tokens as $token ) { $initial = substr( $token, 0, 1 ); if ( $initial >= '1' && $initial <= '7' ) { $newKey .= $initial; $suit = substr( $token, 1 ); if ( $suit == '♣' ) { $newKey .= '1'; } elseif ( $suit == '...
CWE-400
2
public function testRemoveAuthorizationHeaderOnRedirect() { $mock = new MockHandler([ new Response(302, ['Location' => 'http://test.com']), static function (RequestInterface $request) { self::assertFalse($request->hasHeader('Authorization')); retur...
CWE-200
10
private function _titlegt( $option ) { $where = '('; if ( substr( $option, 0, 2 ) == '=_' ) { if ( $this->parameters->getParameter( 'openreferences' ) ) { $where .= 'pl_title >= ' . $this->DB->addQuotes( substr( $sTitleGE, 2 ) ); } else { $where .= $this->tableNames['page'] . '.page_title >= ' . $thi...
CWE-400
2
public function enqueue_scripts() { global $geo_mashup_options, $pagenow, $post; // The location editor works only on posts if ( empty( $post ) ) return null; $load_location_editor = ( is_admin() and preg_match( '/(post|page)(-new|).php/', $pagenow ) and in_array( $post->post_type, $...
CWE-20
0
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-74
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-74
1
public function execute(&$params){ $options = &$this->config['options']; $event = new Events; $notif = new Notification; $user = $this->parseOption('user', $params); $type = $this->parseOption('type', $params); if($type === 'auto'){ if(!isset($params['...
CWE-20
0
private function getCategory() { $category = $this->categoryModel->getById($this->request->getIntegerParam('category_id')); if (empty($category)) { throw new PageNotFoundException(); } return $category; }
CWE-200
10
function fread($handle, $length) { if (\yiiunit\framework\base\SecurityTest::$fread !== null) { return \yiiunit\framework\base\SecurityTest::$fread; } if (\yiiunit\framework\base\SecurityTest::$fopen !== null) { return $length < 8 ? \str_repeat('s', $length) : 'te...
CWE-330
12
function edit_option_master() { expHistory::set('editable', $this->params); $params = isset($this->params['id']) ? $this->params['id'] : $this->params; $record = new option_master($params); assign_to_template(array( 'record'=>$record )); }
CWE-74
1
public function getDisplayName ($plural=true) { return Yii::t('users', '{user}', array( '{user}' => Modules::displayName($plural, 'Users'), )); }
CWE-20
0
public function getClone($modelId = null) { $this->authorize('view', AssetModel::class); // Check if the model exists if (is_null($model_to_clone = AssetModel::find($modelId))) { return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exis...
CWE-862
8
self::removeLevel($kid->id); } }
CWE-74
1
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-200
10
private static function init() { \DPL\Config::init(); if ( !isset( self::$createdLinks ) ) { self::$createdLinks = [ 'resetLinks' => false, 'resetTemplates' => false, 'resetCategories' => false, 'resetImages' => false, 'resetdone' => false, 'elimdone' => false ]; } }
CWE-400
2
public function session() { // Test if logged in, log in if not, log in. try { $this->assertElementPresent('css=ul#user-menu'); } catch (PHPUnit_Framework_AssertionFailedError $e) { /* If this isn't the first time we've logged in, we have a problem; * the...
CWE-20
0
function columnUpdate($table, $col, $val, $where=1) { $res = @mysqli_query($this->connection, "UPDATE `" . $this->prefix . "$table` SET `$col`='" . $val . "' WHERE $where"); /*if ($res == null) return array(); $objects = array(); for ($i = 0; $i < mysqli_num_rows...
CWE-74
1
public function actionGetItems(){ $model = X2Model::model ($this->modelClass); if (isset ($model)) { $tableName = $model->tableName (); $sql = 'SELECT id, subject as value FROM '.$tableName.' WHERE subject LIKE :qterm ORDER BY subject ASC'; ...
CWE-20
0
public function register() { JSession::checkToken('post') or jexit(JText::_('JINVALID_TOKEN')); // Get the application $app = JFactory::getApplication(); // Get the form data. $data = $this->input->post->get('user', array(), 'array'); // Get the model and validate the data. $model = $this->getModel(...
CWE-20
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-20
0
private function _lastmodifiedby( $option ) { $user = new \User; $this->addWhere( $this->DB->addQuotes( $user->newFromName( $option )->getActorId() ) . ' = (SELECT revactor_actor FROM ' . $this->tableNames['revision_actor_temp'] . ' WHERE ' . $this->tableNames['revision_actor_temp'] . '.revactor_page=page_id ...
CWE-400
2
function GoodAuthDigestTestController($serverPort) { $args = array('Authorization' => 'Digest username="admin", ' . 'realm="Restricted area", nonce="564a12611dae8", ' . 'uri="/test_auth_digest.php", cnonce="MjIyMTg1", nc=00000001, ' . 'qop="auth", response="e544aaed06917adea3e5c74dd49f0e32", ' . 'opaq...
CWE-668
7
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-20
0
protected function getSubtask() { $subtask = $this->subtaskModel->getById($this->request->getIntegerParam('subtask_id')); if (empty($subtask)) { throw new PageNotFoundException(); } return $subtask; }
CWE-200
10
function scan_page($parent_id) { global $db; $sections = $db->selectObjects('section','parent=' . $parent_id); $ret = ''; foreach ($sections as $page) { $cLoc = serialize(expCore::makeLocation('container','@section' . $page->id)); ...
CWE-74
1
function login($redirectCallback = null) { $aConf = $GLOBALS['_MAX']['CONF']; if (!is_callable($redirectCallback)) { // Set the default callback $redirectCallback = array('OA_Auth', 'checkRedirect'); } if (call_user_func($redirectCallback)) { ...
CWE-287
4
function delete() { global $db; if (empty($this->params['id'])) return false; $product_type = $db->selectValue('product', 'product_type', 'id=' . $this->params['id']); $product = new $product_type($this->params['id'], true, false); //eDebug($product_type); //eDebug...
CWE-74
1
public function testCheckHTTP() { if (! function_exists('curl_init')) { $this->markTestSkipped('Missing curl extension!'); } $this->assertTrue( $this->object->checkHTTP("http://www.phpmyadmin.net/test/data") ); $this->assertContains( "T...
CWE-20
0
public function testAuthHeader() { $restoreInstance = PMA\libraries\Response::getInstance(); $mockResponse = $this->getMockBuilder('PMA\libraries\Response') ->disableOriginalConstructor() ->setMethods(array('isAjax', 'headersSent', 'header')) ->getMock(); ...
CWE-200
10
public function push($remote = NULL, array $params = NULL) { $this->run('push', $remote, $params); return $this; }
CWE-77
14
public function create_directory() { if (!AuthUser::hasPermission('file_manager_mkdir')) { Flash::set('error', __('You do not have sufficient permissions to create a directory.')); redirect(get_url('plugin/file_manager/browse/')); } // CSRF checks if ...
CWE-20
0
private function _namespace( $option ) { $option === 0 ?? $option = '0'; if ( is_array( $option ) && count( $option ) ) { if ( $this->parameters->getParameter( 'openreferences' ) ) { $this->addWhere( [ "{$this->tableNames['pagelinks']}.pl_namespace" => $option ] ); } else { $this-...
CWE-400
2
public function testIsExpiredReturnsTrueWhenModificationTimesWarrant() { $compiler = new BladeCompiler($files = $this->getFiles(), __DIR__); $files->shouldReceive('exists')->once()->with(__DIR__.'/'.sha1('foo').'.php')->andReturn(true); $files->shouldReceive('lastModified')->once()->with...
CWE-327
3
public static function generate_location_json( ) { /* TODO: Try to track modification? if ( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) { $http_time = strtotime( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ); $mod_time = strtotime( $post->post_modified_gmt . ' GMT' ); if ($mod_time <= $http_time) { re...
CWE-20
0
public function actionGetItems(){ $sql = 'SELECT id, name as value FROM x2_templates WHERE name LIKE :qterm ORDER BY name ASC'; $command = Yii::app()->db->createCommand($sql); $qterm = $_GET['term'].'%'; $command->bind...
CWE-20
0
function edit_order_item() { $oi = new orderitem($this->params['id'], true, true); if (empty($oi->id)) { flash('error', gt('Order item doesn\'t exist.')); expHistory::back(); } $oi->user_input_fields = expUnserialize($oi->user_input_fields); $params['o...
CWE-74
1
private function _verify($public_key_or_secret, $expected_alg = null) { $segments = explode('.', $this->raw); $signature_base_string = implode('.', array($segments[0], $segments[1])); if (!$expected_alg) { # NOTE: might better to warn here $expected_alg = $this->heade...
CWE-200
10
public static function sortByPriority( $parameters ) { if ( !is_array( $parameters ) ) { throw new \MWException( __METHOD__ . ': A non-array was passed.' ); } //'category' to get category headings first for ordermethod. //'include'/'includepage' to make sure section labels are ready for 'table'. $priority...
CWE-400
2
public function showall() { expHistory::set('viewable', $this->params); // figure out if should limit the results if (isset($this->params['limit'])) { $limit = $this->params['limit'] == 'none' ? null : $this->params['limit']; } else { $limit = (isset($this->co...
CWE-74
1
foreach($image->expTag as $tag) { if (isset($used_tags[$tag->id])) { $used_tags[$tag->id]->count++; } else { $exptag = new expTag($tag->id); $used_tags[$tag->id] = $exptag; $used_tags[$tag->id]->c...
CWE-74
1
function unlockTables() { $sql = "UNLOCK TABLES"; $res = mysqli_query($this->connection, $sql); return $res; }
CWE-74
1
function showByModel() { global $order, $template, $db; expHistory::set('viewable', $this->params); $product = new product(); $model = $product->find("first", 'model="' . $this->params['model'] . '"'); //eDebug($model); $product_type = new $model->product_type($model...
CWE-20
0
$section = new section($this->params); } else { notfoundController::handle_not_found(); exit; } if (!empty($section->id)) { $check_id = $section->id; } else { $check_id = $section->parent; } if (expPer...
CWE-74
1
public function testPopBeforeSmtpGood() { //Start a fake POP server $pid = shell_exec('nohup ./runfakepopserver.sh >/dev/null 2>/dev/null & printf "%u" $!'); $this->pids[] = $pid; sleep(2); //Test a known-good login $this->assertTrue( POP3::popBeforeS...
CWE-20
0
public static function checkPermissions($permission,$location) { global $exponent_permissions_r, $router; // only applies to the 'manage' method if (empty($location->src) && empty($location->int) && (!empty($router->params['action']) && $router->params['action'] == 'manage') || strpos($...
CWE-74
1
public function testPages () { $this->visitPages ( $this->allPages ); }
CWE-20
0
function edit_option_master() { expHistory::set('editable', $this->params); $params = isset($this->params['id']) ? $this->params['id'] : $this->params; $record = new option_master($params); assign_to_template(array( 'record'=>$record )); }
CWE-74
1
function cron_dbmanager_backup() { global $wpdb; $backup_options = get_option('dbmanager_options'); $backup_email = stripslashes($backup_options['backup_email']); if(intval($backup_options['backup_period']) > 0) { $backup = array(); $backup['date'] = current_time('timestamp'); $backup['mysqldumppath'] = $back...
CWE-20
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-74
1
public static function initializeNavigation() { $sections = section::levelTemplate(0, 0); return $sections; }
CWE-74
1
private function _addeditdate( $option ) { $this->addTable( 'revision_actor_temp', 'rev' ); $this->addSelect( [ 'rev.revactor_timestamp' ] ); $this->addWhere( [ $this->tableNames['page'] . '.page_id = rev.revactor_page', ] ); }
CWE-400
2
$cLoc = serialize(expCore::makeLocation('container','@section' . $page->id)); $ret .= scan_container($cLoc, $page->id); $ret .= scan_page($page->id); }
CWE-74
1
public function activate_discount(){ if (isset($this->params['id'])) { $discount = new discounts($this->params['id']); $discount->update($this->params); //if ($discount->discountulator->hasConfig() && empty($discount->config)) { //flash('messages', $di...
CWE-74
1
foreach ($events as $event) { $extevents[$date][] = $event; }
CWE-74
1
foreach ($allusers as $uid) { $u = user::getUserById($uid); expPermissions::grant($u, 'manage', $sloc); }
CWE-74
1
function function_exists($name) { if (isset(\yiiunit\framework\base\SecurityTest::$functions[$name])) { return \yiiunit\framework\base\SecurityTest::$functions[$name]; } return \function_exists($name); }
CWE-330
12
public function index($id) { $this->paginate['conditions'] = array('GalaxyElement.galaxy_cluster_id' => $id); $clusters = $this->paginate(); $this->set('list', $clusters); if ($this->request->is('ajax')) { $this->layout = 'ajax'; $this->render('ajax/index'...
CWE-862
8
public function create_file() { if (!AuthUser::hasPermission('file_manager_mkfile')) { Flash::set('error', __('You do not have sufficient permissions to create a file.')); redirect(get_url('plugin/file_manager/browse/')); } // CSRF checks if (isset($_...
CWE-20
0
$fileName = ltrim(dirname($fileName) . '/' . basename($fileName, '.js'), '/.'); if (empty($fileName)) { continue; } $templateNames[] = $inflector->filter(array( 'module' => $moduleName, 'controller' => $controllerName,...
CWE-20
0
function delete_vendor() { global $db; if (!empty($this->params['id'])){ $db->delete('vendor', 'id =' .$this->params['id']); } expHistory::back(); }
CWE-74
1
protected function assertCsvUploaded($csv) { $uploadedPath = implode(DIRECTORY_SEPARATOR, array( Yii::app()->basePath, 'data', 'data.csv' )); $this->assertFileExists ($uploadedPath); $this->assertFileEquals ($csv, $uploadedPath); }
CWE-20
0
public function __construct(Project $project) { parent::__construct('Project #' . $project->getID() . ' is not active and is not a template'); $this->project = $project; }
CWE-863
11
public function __construct( Parameters $parameters ) { $this->parameters = $parameters; $this->tableNames = self::getTableNames(); $this->DB = wfGetDB( DB_REPLICA, 'dpl' ); }
CWE-400
2
public static function fixName($name) { $name = preg_replace('/[^A-Za-z0-9\.]/','_',$name); if ($name[0] == '.') $name[0] = '_'; return $name; // return preg_replace('/[^A-Za-z0-9\.]/', '-', $name); }
CWE-74
1
function showallSubcategories() { // global $db; expHistory::set('viewable', $this->params); // $parent = isset($this->params['cat']) ? $this->params['cat'] : expSession::get('catid'); $catid = expSession::get('catid'); $parent = !empty($catid) ? $catid : (!empty($this->params...
CWE-20
0
public static function parseAndTrimImport($str, $isHTML = false) { //�Death from above�? � //echo "1<br>"; eDebug($str); // global $db; $str = str_replace("�", "&rsquo;", $str); $str = str_replace("�", "&lsquo;", $str); $str = str_replace("�", "&#174;", $str); $str = ...
CWE-74
1
function PMA_secureSession() { // prevent session fixation and XSS // (better to use session_status() if available) if ((PMA_PHP_INT_VERSION >= 50400 && session_status() === PHP_SESSION_ACTIVE) || (PMA_PHP_INT_VERSION < 50400 && session_id() !== '') ) { session_regenerate_id(true); }...
CWE-200
10
function edit_section() { global $db, $user; $parent = new section($this->params['parent']); if (empty($parent->id)) $parent->id = 0; assign_to_template(array( 'haveStandalone' => ($db->countObjects('section', 'parent=-1') && $parent->id >= 0), 'paren...
CWE-74
1
public function confirm() { global $db; // make sure we have what we need. if (empty($this->params['key'])) expQueue::flashAndFlow('error', gt('The security key for account was not supplied.')); if (empty($this->params['id'])) expQueue::flashAndFlow('error', gt('The subscrib...
CWE-74
1
function PMA_linkURL($url) { if (!preg_match('#^https?://#', $url) || defined('PMA_SETUP')) { return $url; } if (!function_exists('PMA_URL_getCommon')) { include_once './libraries/url_generating.lib.php'; } $params = array(); $params['url'] = $url; $url = PMA_URL_getCommon(...
CWE-200
10
private function setFooter( $footer ) { if ( \DynamicPageListHooks::getDebugLevel() == 5 ) { $footer .= '</nowiki></pre>'; } $this->footer = $this->replaceVariables( $footer ); }
CWE-400
2
private function _notcreatedby( $option ) { $this->addTable( 'revision', 'no_creation_rev' ); $this->addTable( 'revision_actor_temp', 'no_creation_rev_actor' ); $user = new \User; $this->addWhere( $this->DB->addQuotes( $user->newFromName( $option )->getActorId() ) . ' != no_creation_rev_actor.revactor_actor A...
CWE-400
2
public function putAction(Request $request) { $this->checkArguments($request); $user = $this->tokenStorage->getToken()->getUser(); $this->userManager->save($request->request->all(), $request->get('locale'), $user->getId(), true); $user->setFirstName($request->get('firstName')); ...
CWE-269
6
public function getXForwardedForData() { return array( array(false, '10.0.0.1'), array('10.0.0.2', '10.0.0.2, 10.0.0.1'), array('10.0.0.2, 10.0.0.3', '10.0.0.2, 10.0.0.3, 10.0.0.1'), ); }
CWE-20
0
public function setHeadItemAttributes( $attributes ) { $this->headItemAttributes = \Sanitizer::fixTagAttributes( $attributes, 'li' ); }
CWE-400
2
public function formatTemplateArg( $arg, $s, $argNr, $firstCall, $maxLength, Article $article ) { $tableFormat = $this->getParameters()->getParameter( 'tablerow' ); // we could try to format fields differently within the first call of a template // currently we do not make such a difference // if the result s...
CWE-400
2
public static function getHost() { if (isset($_SERVER['HTTP_HOST'])) { $site_address = (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] ; } else if (class_exists('erLhcoreClassInstance')) { $site_address = 'https://' . erLhcoreCla...
CWE-116
15
function selectArraysBySql($sql) { $res = @mysqli_query($this->connection, $this->injectProof($sql)); if ($res == null) return array(); $arrays = array(); for ($i = 0, $iMax = mysqli_num_rows($res); $i < $iMax; $i++) $arrays[] = mysqli_fetch_assoc($res...
CWE-74
1
public static function getSetting( $setting ) { return ( array_key_exists( $setting, self::$settings ) ? self::$settings[$setting] : null ); }
CWE-400
2
public function testRemoveAuthorizationHeaderOnRedirect() { $mock = new MockHandler([ new Response(302, ['Location' => 'http://test.com']), static function (RequestInterface $request) { self::assertFalse($request->hasHeader('Authorization')); retur...
CWE-863
11
private function _firstrevisionsince( $option ) { $this->addTable( 'revision_actor_temp', 'rev' ); $this->addSelect( [ 'rev.revactor_rev', 'rev.revactor_timestamp' ] ); // tell the query optimizer not to look at rows that the following subquery will filter out anyway $this->addWhere( [ $...
CWE-400
2
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-74
1
foreach ($elem[2] as $field) { echo ' <tr class="tr_cf tr_fields hidden" id="cf_tr_'.$field[0].'"> <td valign="top" class="td_title">&nbsp;&nbsp;<i class="fa fa-caret-right"></i>&nbsp;<i>'.$field[1].'</i> :</td> <td>'; i...
CWE-269
6
function edit_vendor() { $vendor = new vendor(); if(isset($this->params['id'])) { $vendor = $vendor->find('first', 'id =' .$this->params['id']); assign_to_template(array( 'vendor'=>$vendor )); } }
CWE-74
1
public function __construct() { $this->smtp_conn = 0; $this->error = null; $this->helo_rply = null; $this->do_debug = 0; }
CWE-20
0
function manage () { expHistory::set('viewable', $this->params); $vendor = new vendor(); $vendors = $vendor->find('all'); if(!empty($this->params['vendor'])) { $purchase_orders = $this->purchase_order->find('all', 'vendor_id=' . $this->params['vendor']); } else { $purchase_orders = $this->purchas...
CWE-74
1
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-74
1
public function formatItem( Article $article, $pageText = null ) { global $wgLang; $item = ''; // DPL Article, not MediaWiki. $date = $article->getDate(); if ( $date !== null ) { $item .= $date . ' '; if ( $article->mRevision !== null ) { $item .= '[{{fullurl:' . $article->mTitle . '|oldid=' . $a...
CWE-400
2
public function fromFile($filePath) { if ($filePath === null) { return; } $file = new FileObj($filePath); $this->file_name = $file->getFilename(); $this->file_size = $file->getSize(); $this->content_type = $file->getMimeType(); $this->disk_nam...
CWE-362
18