code stringlengths 23 2.05k | label_name stringlengths 6 7 | label int64 0 37 |
|---|---|---|
protected function fixupImportedAttributes($modelName, X2Model &$model) {
if ($modelName === 'Contacts' || $modelName === 'X2Leads')
$this->fixupImportedContactName ($model);
if ($modelName === 'Actions' && isset($model->associationType))
$this->reconstructImportedActionAsso... | CWE-20 | 0 |
function import() {
$pullable_modules = expModules::listInstalledControllers($this->baseclassname);
$modules = new expPaginator(array(
'records' => $pullable_modules,
'controller' => $this->loc->mod,
'action' => $this->params['action'],
'order' ... | CWE-74 | 1 |
public static function returnChildrenAsJSON() {
global $db;
//$nav = section::levelTemplate(intval($_REQUEST['id'], 0));
$id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
$nav = $db->selectObjects('section', 'parent=' . $id, 'rank');
//FIXME $m... | CWE-74 | 1 |
function XMLRPCtest($string) {
$string = processInputData($string, ARG_STRING);
return array('status' => 'success',
'message' => 'RPC call worked successfully',
'string' => $string);
} | CWE-20 | 0 |
static function description() { return gt("Places navigation links/menus on the page."); }
| CWE-74 | 1 |
static function author() {
return "Dave Leffler";
}
| CWE-74 | 1 |
public function formatItem( Article $article, $pageText = null ) {
$item = '';
if ( $pageText !== null ) {
//Include parsed/processed wiki markup content after each item before the closing tag.
$item .= $pageText;
}
$item = $this->getItemStart() . $item . $this->getItemEnd();
$item = $this->replaceT... | CWE-400 | 2 |
public static function getHelpVersion($version_id) {
global $db;
return $db->selectValue('help_version', 'version', 'id="'.$version_id.'"');
} | CWE-74 | 1 |
function lockTable($table,$lockType="WRITE") {
$sql = "LOCK TABLES `" . $this->prefix . "$table` $lockType";
$res = mysqli_query($this->connection, $sql);
return $res;
} | CWE-74 | 1 |
$module_views[$key]['name'] = gt($value['name']);
}
// look for a config form for this module's current view
// $controller->loc->mod = expModules::getControllerClassName($controller->loc->mod);
//check to see if hcview was passed along, indicating a hard-coded module
// if (!empty($contr... | CWE-74 | 1 |
$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-74 | 1 |
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-74 | 1 |
public function testEncrypt($string, $key, $expected) {
$this->string(\Toolbox::encrypt($string, $key))->isIdenticalTo($expected);
} | CWE-327 | 3 |
public function onKernelResponse(ResponseEvent $event)
{
if (!$event->isMainRequest()) {
return;
}
$request = $event->getRequest();
if (!$request->hasSession() || !$request->attributes->get('_security_firewall_run', false)) {
return;
}
i... | CWE-287 | 4 |
private function _categoriesminmax( $option ) {
if ( is_numeric( $option[0] ) ) {
$this->addWhere( intval( $option[0] ) . ' <= (SELECT count(*) FROM ' . $this->tableNames['categorylinks'] . ' WHERE ' . $this->tableNames['categorylinks'] . '.cl_from=page_id)' );
}
if ( is_numeric( $option[1] ) ) {
$this->ad... | CWE-400 | 2 |
public static function parseAndTrimImport($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 = ... | CWE-74 | 1 |
public function testUserCredentials($email, $password, $server, $port, $security) {
require_once(realpath(Yii::app()->basePath.'/components/phpMailer/class.phpmailer.php'));
require_once(realpath(Yii::app()->basePath.'/components/phpMailer/class.smtp.php'));
$phpMail = new PHPMailer(true);
... | CWE-20 | 0 |
protected function markCompleted($endStatus, ServiceResponse $serviceResponse, $gatewayMessage)
{
parent::markCompleted($endStatus, $serviceResponse, $gatewayMessage);
$this->createMessage(Message\VoidedResponse::class, $gatewayMessage);
ErrorHandling::safeExtend($this->payment, 'onVoid... | CWE-436 | 5 |
public function delete_version() {
if (empty($this->params['id'])) {
flash('error', gt('The version you are trying to delete could not be found'));
}
// get the version
$version = new help_version($this->params['id']);
if (empty($version->id)) {
flash('error', gt('The v... | CWE-74 | 1 |
private function __pullEvent($eventId, &$successes, &$fails, $eventModel, $server, $user, $jobId)
{
$event = $eventModel->downloadEventFromServer(
$eventId,
$server
);
if (!empty($event)) {
if ($this->__checkIfEventIsBlockedBeforePull($event)) ... | CWE-269 | 6 |
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 |
function edit_externalalias() {
$section = isset($this->params['id']) ? $this->section->find($this->params['id']) : new section($this->params);
if ($section->parent == -1) {
notfoundController::handle_not_found();
exit;
} // doesn't work for standalone pages
... | CWE-74 | 1 |
private function checkResponse ($string) {
if (substr($string, 0, 3) !== '+OK') {
$this->error = array(
'error' => "Server reported an error: $string",
'errno' => 0,
'errstr' => ''
);
if ($this->do_debug >= 1) {
$this->displayErrors();
}
return false... | CWE-20 | 0 |
public function approve_toggle() {
if (empty($this->params['id'])) return;
/* 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['re... | CWE-74 | 1 |
$section = new section(intval($page));
if ($section) {
// self::deleteLevel($section->id);
$section->delete();
}
}
}
| CWE-74 | 1 |
private function _minrevisions( $option ) {
$this->addWhere( "((SELECT count(rev_aux2.revactor_page) FROM {$this->tableNames['revision_actor_temp']} AS rev_aux2 WHERE rev_aux2.revactor_page = {$this->tableNames['page']}.page_id) >= {$option})" );
} | CWE-400 | 2 |
private function getFullOutput( $totalResults = false, $skipHeaderFooter = true ) {
if ( !$skipHeaderFooter ) {
$header = '';
$footer = '';
//Only override header and footers if specified.
$_headerType = $this->getHeaderFooterType( 'header', $totalResults );
if ( $_headerType !== false ) {
$header... | CWE-400 | 2 |
$ds = self::connectToServer($replicate["host"], $replicate["port"],
$ldap_method['rootdn'],
Toolbox::decrypt($ldap_method['rootdn_passwd'], GLPIKEY),
$ldap_method['use_tls'], $ldap_method[... | CWE-327 | 3 |
function invalidTestController($port) {
$host = php_uname('n');
$filename = __DIR__.'/request-doesnotexist.dat';
$file = fopen($filename, 'rb');
$req_dat = fread($file, filesize($filename));
fclose($file);
// Repeat the data three times, to make it invalid. This particular bytestream
// (and ones like i... | CWE-668 | 7 |
public static function getTemplateHierarchyFlat($parent, $depth = 1) {
global $db;
$arr = array();
$kids = $db->selectObjects('section_template', 'parent=' . $parent, 'rank');
// $kids = expSorter::sort(array('array'=>$kids,'sortby'=>'rank', 'order'=>'ASC'));
for ($i = 0, $i... | CWE-74 | 1 |
function format_install_param( $value )
{
$value = str_replace( array( "'", "\$" ), array( "\'", "\\$" ), $value );
return preg_replace( "#([\\\\]*)(\\\\\\\')#", "\\\\\\\\\\\\\\\\\'", $value );
} | CWE-20 | 0 |
public function admin_delete($id = null)
{
if (!$this->request->is('post') && !$this->request->is('delete')) {
throw new MethodNotAllowedException(__('Action not allowed, post or delete request expected.'));
}
if (!$this->_isAdmin()) {
throw new Exception('Adminis... | CWE-269 | 6 |
public function buildControl() {
$control = new colorcontrol();
if (!empty($this->params['value'])) $control->value = $this->params['value'];
if ($this->params['value'][0] != '#') $this->params['value'] = '#' . $this->params['value'];
$control->default = $this->params['value'];
... | CWE-74 | 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-74 | 1 |
function twig_array_filter(Environment $env, $array, $arrow)
{
if (!twig_test_iterable($array)) {
throw new RuntimeError(sprintf('The "filter" filter expects an array or "Traversable", got "%s".', \is_object($array) ? \get_class($array) : \gettype($array)));
}
if (!$arrow instanceof Closure && $env... | CWE-74 | 1 |
private function _lastrevisionbefore( $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(
[
$this->tableNames... | CWE-400 | 2 |
public function store(CreateAppointmentCalendarRequest $request)
{
$client_id = null;
$user = User::where('external_id', $request->user)->first();
if ($request->client_external_id) {
$client_id = Client::where('external_id', $request->client_external_id)->first()->id;
... | CWE-862 | 8 |
static function convertXMLFeedSafeChar($str) {
$str = str_replace("<br>","",$str);
$str = str_replace("</br>","",$str);
$str = str_replace("<br/>","",$str);
$str = str_replace("<br />","",$str);
$str = str_replace(""",'"',$str);
$str = str_replace("'","'",$str);
... | CWE-74 | 1 |
private static function _aesEncrypt($data, $secret)
{
if (!is_string($data)) {
throw new \InvalidArgumentException('Input parameter "$data" must be a string.');
}
if (!function_exists("openssl_encrypt")) {
throw new \SimpleSAML_Error_Exception('The openssl PHP mo... | CWE-326 | 9 |
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-200 | 10 |
public function logout()
{
if ($this->Session->check('Auth.User')) {
$this->__extralog("logout");
}
$this->Flash->info(__('Good-Bye'));
$user = $this->User->find('first', array(
'conditions' => array(
'User.id' => $this->Auth->user('id')
... | CWE-269 | 6 |
function remove() {
global $db;
$section = $db->selectObject('section', 'id=' . $this->params['id']);
if ($section) {
section::removeLevel($section->id);
$db->decrement('section', 'rank', 1, 'rank > ' . $section->rank . ' AND parent=' . $section->parent);
... | CWE-74 | 1 |
public function downloadfile() {
if (empty($this->params['fileid'])) {
flash('error', gt('There was an error while trying to download your file. No File Specified.'));
expHistory::back();
}
$fd = new filedownload($this->params['fileid']);
if (empty(... | CWE-74 | 1 |
$db->updateObject($value, 'section');
}
$db->updateObject($moveSec, 'section');
//handle re-ranking of previous parent
$oldSiblings = $db->selectObjects("section", "parent=" . $oldParent . " AND rank>" . $oldRank . " ORDER BY rank")... | CWE-74 | 1 |
public static function canView($section) {
global $db;
if ($section == null) {
return false;
}
if ($section->public == 0) {
// Not a public section. Check permissions.
return expPermissions::check('view', expCore::makeLocation('navigation... | CWE-74 | 1 |
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 |
public function bind($dn = null, $password = null)
{
/* Fetch current bind credentials. */
if (empty($dn)) {
$dn = $this->_config['binddn'];
}
if (empty($password)) {
$password = $this->_config['bindpw'];
}
/* Connect first, if we haven't ... | CWE-287 | 4 |
$emails[$u->email] = trim(user::getUserAttribution($u->id));
}
| CWE-74 | 1 |
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 |
function BadAuthDigestTestController($serverPort) {
$args = array('Authorization' => 'Digest "username="admin", ' .
'realm="Restricted area", nonce="564a12f5c065e", ' .
'uri="/test_auth_digest.php", cnonce="MjIyMTg2", nc=00000001, ' .
'qop="auth", response="6dfbea52fbf13016476c1879e6436004", ' .
'opaq... | CWE-668 | 7 |
function update_option_master() {
global $db;
$id = empty($this->params['id']) ? null : $this->params['id'];
$opt = new option_master($id);
$oldtitle = $opt->title;
$opt->update($this->params);
// if the title of the master changed we should... | CWE-74 | 1 |
public function settings_save() {
AuthUser::load();
if (!AuthUser::isLoggedIn()) {
redirect(get_url('login'));
} else if (!AuthUser::hasPermission('admin_edit')) {
Flash::set('error', __('You do not have permission to access the requested page!'));
redirec... | CWE-20 | 0 |
public function save($check_notify = false)
{
if (isset($_POST['email_recipients']) && is_array($_POST['email_recipients'])) {
$this->email_recipients = base64_encode(serialize($_POST['email_recipients']));
}
return parent::save($check_notify);
} | CWE-863 | 11 |
function searchByModelForm() {
// get the search terms
$terms = $this->params['search_string'];
$sql = "model like '%" . $terms . "%'";
$limit = !empty($this->config['limit']) ? $this->config['limit'] : 10;
$page = new expPaginator(array(
'model' => 'produc... | CWE-20 | 0 |
protected function renderImageByImagick($code)
{
$backColor = $this->transparent ? new \ImagickPixel('transparent') : new \ImagickPixel('#' . str_pad(dechex($this->backColor), 6, 0, STR_PAD_LEFT));
$foreColor = new \ImagickPixel('#' . str_pad(dechex($this->foreColor), 6, 0, STR_PAD_LEFT));
... | CWE-330 | 12 |
public function Update() {
// Update "main" ticket
$upd_stmt = Database::prepare('
UPDATE `' . TABLE_PANEL_TICKETS . '` SET
`priority` = :priority,
`lastchange` = :lastchange,
`status` = :status,
`lastreplier` = :lastreplier
WHERE ... | CWE-732 | 13 |
public function __construct( \DPL\Parameters $parameters, \Parser $parser ) {
parent::__construct( $parameters, $parser );
$this->textSeparator = $parameters->getParameter( 'inlinetext' );
$listSeparators = $parameters->getParameter( 'listseparators' );
if ( isset( $listSeparators[0] ) ) {
$this->listStart ... | CWE-400 | 2 |
public function validate($value, $isUserFormat = false)
{
if (empty($value)) {
return;
}
if (\is_string($value)) {
$value = \App\Json::decode($value);
}
if (!\is_array($value)) {
throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . $this->getFieldModel()->getFieldName() . '||' . $this->... | CWE-20 | 0 |
private function resolveTrustedProxy()
{
if (!$trustedProxies = Request::getTrustedProxies()) {
return '127.0.0.1';
}
$firstTrustedProxy = reset($trustedProxies);
return false !== ($i = strpos($firstTrustedProxy, '/')) ? substr($firstTrustedProxy, 0, $i) : $firstTru... | CWE-20 | 0 |
$this->run('rm', $item, '-r');
}
return $this;
} | CWE-77 | 14 |
foreach ( $option as $_option ) {
//Parameter functions return true or false. The full parameter data will be passed into the Query object later.
if ( $this->parameters->$parameter( $_option ) === false ) {
//Do not build this into the output just yet. It will be collected at the end.
$this->logg... | CWE-400 | 2 |
public function save() {
$data = $_POST['file'];
// security (remove all ..)
$data['name'] = str_replace('..', '', $data['name']);
$file = FILES_DIR . DS . $data['name'];
// CSRF checks
if (isset($_POST['csrf_token'])) {
$csrf_token = $_POST['csr... | CWE-20 | 0 |
public function newModel() {
return new APIModel('testuser','5f4dcc3b5aa765d61d8327deb882cf99',rtrim(TEST_BASE_URL,'/'));
} | CWE-20 | 0 |
function manage() {
global $db;
expHistory::set('manageable', $this->params);
// $classes = array();
$dir = BASE."framework/modules/ecommerce/billingcalculators";
if (is_readable($dir)) {
$dh = opendir($dir);
while (($file = readdir($dh)) !== false) {
... | CWE-74 | 1 |
public function view() {
$params = func_get_args();
$content = '';
$filename = urldecode(join('/', $params));
// Sanitize filename for securtiy
// We don't allow backlinks
if (strpos($filename, '..') !== false) {
/*
if (Plugin::isEnabled('sta... | CWE-20 | 0 |
$value = str_replace($originalName, $cleanedName, $value);
}
unset($value);
}
$result = hash_equals(GeneralUtility::hmac(serialize($fieldChangeFunctions)), $this->parameters['fieldChangeFuncHash']);
}
return $result;
} | CWE-327 | 3 |
$this->subtaskTimeTrackingModel->logEndTime($subtaskId, $this->userSession->getId());
$this->subtaskTimeTrackingModel->updateTaskTimeTracking($task['id']);
} | CWE-200 | 10 |
protected function sort(&$rowsKey, $sortColumn) {
$sortMethod = $this->getTableSortMethod();
if ($sortColumn < 0) {
switch ($sortMethod) {
case 'natural':
// Reverse natsort()
uasort($rowsKey, function($first, $second) {
return strnatcmp($second, $first);
... | CWE-400 | 2 |
$this->run('mv', $from, $to);
}
return $this;
} | CWE-77 | 14 |
public function __construct() {
global $wgRequest;
$this->DB = wfGetDB( DB_REPLICA, 'dpl' );
$this->parameters = new Parameters();
$this->logger = new Logger( $this->parameters->getData( 'debug' )['default'] );
$this->tableNames = Query::getTableNames();
$this->wgRequest = $wgRequest;
} | CWE-400 | 2 |
public function downloadfile() {
if (empty($this->params['fileid'])) {
flash('error', gt('There was an error while trying to download your file. No File Specified.'));
expHistory::back();
}
$fd = new filedownload($this->params['fileid']);
if (empty(... | CWE-74 | 1 |
public function browse() {
$params = func_get_args();
$this->path = join('/', $params);
// make sure there's a / at the end
if (substr($this->path, -1, 1) != '/')
$this->path .= '/';
//security
// we dont allow back link
if (strpos($this->path, '... | CWE-20 | 0 |
public function actionGetItems(){
$sql = 'SELECT id, name as value FROM x2_products WHERE name LIKE :qterm ORDER BY name ASC';
$command = Yii::app()->db->createCommand($sql);
$qterm = $_GET['term'].'%';
$command->bindParam(":qterm", $qterm, PDO::PARAM_STR);
$result = $command... | CWE-20 | 0 |
function update_vendor() {
$vendor = new vendor();
$vendor->update($this->params['vendor']);
expHistory::back();
} | CWE-74 | 1 |
public function renderAttribute ($name) {
switch ($name) {
case 'name':
echo $this->relatedModel->getLink (/*array (
'class' => 'quick-read-link',
'data-id' => $this->relatedModel->id,
'data-class' => get_class ($this->r... | CWE-20 | 0 |
print_r($single_error);
}
echo '</pre>';
} | CWE-20 | 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-200 | 10 |
public function Connect($host, $port = 0, $tval = 30) {
// set the error val to null so there is no confusion
$this->error = null;
// make sure we are __not__ connected
if($this->connected()) {
// already connected, generate error
$this->error = array("error" => "Already connected to a se... | CWE-20 | 0 |
function edit_freeform() {
$section = isset($this->params['id']) ? $this->section->find($this->params['id']) : new section($this->params);
if ($section->parent == -1) {
notfoundController::handle_not_found();
exit;
} // doesn't work for standalone pages
... | CWE-74 | 1 |
public function confirm()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$this->response->html($this->template->render('subtask/remove', array(
'subtask' => $subtask,
'task' => $task,
)));
} | CWE-200 | 10 |
function addDiscountToCart() {
// global $user, $order;
global $order;
//lookup discount to see if it's real and valid, and not already in our cart
//this will change once we allow more than one coupon code
$discount = new discounts();
$discount = $discount->getCoupon... | CWE-20 | 0 |
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 |
function getTypes($subtype="both") {
$types = array("users" => array(),
"resources" => array());
if($subtype == "users" || $subtype == "both") {
$query = "SELECT id, name FROM userprivtype";
$qh = doQuery($query, 365);
while($row = mysql_fetch_assoc($qh)) {
if($row["name"] == "block" || $row[... | CWE-20 | 0 |
public function delete() {
global $db, $history;
/* 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']) ? SIMPL... | CWE-74 | 1 |
$payment->write();
$i++;
}
// Ugly hack to set the money amount
$this->payment->Status = 'Created';
$this->payment->setAmount($total);
// If not everything was refunded, the payment should still have the "Captured" status
... | CWE-436 | 5 |
public function urlProvider()
{
return array(
array('http://till:test@svn.example.org/', $this->getCmd(" --username 'till' --password 'test' ")),
array('http://svn.apache.org/', ''),
array('svn://johndoe@example.org', $this->getCmd(" --username 'johndoe' --password ''... | CWE-77 | 14 |
public function __construct() {
$this->pop_conn = 0;
$this->connected = false;
$this->error = null;
} | 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 |
private function _hiddencategories( $option ) {
//@TODO: Unfinished functionality! Never implemented by original author.
} | CWE-400 | 2 |
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 update_option_master() {
global $db;
$id = empty($this->params['id']) ? null : $this->params['id'];
$opt = new option_master($id);
$oldtitle = $opt->title;
$opt->update($this->params);
// if the title of the master changed we should... | CWE-74 | 1 |
public function formatItem( Article $article, $pageText = null ) {
$item = $article->mTitle;
if ( $pageText !== null ) {
//Include parsed/processed wiki markup content after each item before the closing tag.
$item .= $pageText;
}
$item = $this->getItemStart() . $item . $this->itemEnd;
$item = $this-... | CWE-400 | 2 |
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-74 | 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-74 | 1 |
public function event()
{
$project = $this->getProject();
$values = $this->request->getValues();
if (empty($values['action_name']) || empty($values['project_id'])) {
return $this->create();
}
return $this->response->html($this->template->render('action_creat... | CWE-200 | 10 |
public function addMessage( $errorId ) {
$args = func_get_args();
$args = array_map( 'htmlspecialchars', $args );
return call_user_func_array( [ $this, 'msg' ], $args );
} | CWE-400 | 2 |
return $wgLang->timeanddate( $article->mDate, true );
}
return null;
} | CWE-400 | 2 |
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-200 | 10 |
function getUserGroupID($name, $affilid=DEFAULT_AFFILID) {
$query = "SELECT id "
. "FROM usergroup "
. "WHERE name = '$name' AND "
. "affiliationid = $affilid";
$qh = doQuery($query, 300);
if($row = mysql_fetch_row($qh)) {
return $row[0];
}
$query = "INSERT INTO usergroup "
... | CWE-20 | 0 |
foreach ($allgroups as $gid) {
$g = group::getGroupById($gid);
expPermissions::grantGroup($g, 'manage', $sloc);
}
| CWE-74 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.