code stringlengths 23 2.05k | label_name stringlengths 6 7 | label int64 0 37 |
|---|---|---|
$stmt->bindValue(":$field", $domain, SQLITE3_TEXT);
if($bindcomment) {
$stmt->bindValue(":comment", $comment, SQLITE3_TEXT);
}
if($stmt->execute() && $stmt->reset())
$num++;
else
{
$stmt->close();
if($returnnum)
return $num;
else
{
if($num === 1)
$plural = "";
else
$... | CWE-862 | 8 |
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-200 | 10 |
public function editspeed() {
global $db;
if (empty($this->params['id'])) return false;
$calcname = $db->selectValue('shippingcalculator', 'calculator_name', 'id='.$this->params['id']);
$calc = new $calcname($this->params['id']);
assign_to_template(array(
'calculato... | CWE-74 | 1 |
} elseif ( $rowSize > 0 ) {
// repeat row header after n lines of output
$nstart = 0;
$nsize = $rowSize;
$count = count( $articles );
$output .= '{|' . $rowColFormat . "\n|\n";
do {
if ( $nstart + $nsize > $count ) {
$nsize = $count - $nstart;
}
$output .= $lister->formatList( $ar... | CWE-400 | 2 |
$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 |
public function actionGetItems(){
$sql = 'SELECT id, name as value FROM x2_docs 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->queryAll();
echo CJSON::encod... | CWE-20 | 0 |
static public function deleteCategory($_id = 0) {
if ($_id != 0) {
$result_stmt = Database::prepare("
SELECT COUNT(`id`) as `numtickets` FROM `" . TABLE_PANEL_TICKETS . "`
WHERE `category` = :cat"
);
$result = Database::pexecute_first($result_stmt, array('cat' => $_id));
if ($result['numticket... | CWE-732 | 13 |
public function approve() {
expHistory::set('editable', $this->params);
/* 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['requi... | CWE-74 | 1 |
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-74 | 1 |
public function delete() {
global $db;
/* 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']) ? COMMENTS_REQUIRE_LO... | CWE-74 | 1 |
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-74 | 1 |
function XMLRPCremoveImageGroupFromComputerGroup($imageGroup, $computerGroup){
$imageid = getResourceGroupID("image/$imageGroup");
$compid = getResourceGroupID("computer/$computerGroup");
if($imageid && $compid){
$tmp = getUserResources(array("imageAdmin"),
array("man... | CWE-20 | 0 |
function send_feedback() {
$success = false;
if (isset($this->params['id'])) {
$ed = new eventdate($this->params['id']);
// $email_addrs = array();
if ($ed->event->feedback_email != '') {
$msgtemplate = expTemplate::get_template_for_action($th... | CWE-74 | 1 |
public function theme_switch() {
if (!expUtil::isReallyWritable(BASE.'framework/conf/config.php')) { // we can't write to the config.php file
flash('error',gt('The file /framework/conf/config.php is NOT Writeable. You will be unable to change the theme.'));
}
expSettings::change('D... | CWE-74 | 1 |
Variables::setVar( [ '', '', $argName, $argValue ] );
if ( defined( 'ExtVariables::VERSION' ) ) {
\ExtVariables::get( $this->parser )->setVarValue( $argName, $argValue );
}
}
} | CWE-400 | 2 |
public function approve() {
expHistory::set('editable', $this->params);
/* 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['requi... | CWE-74 | 1 |
public function remove()
{
$this->checkCSRFParam();
$project = $this->getProject();
$filter = $this->customFilterModel->getById($this->request->getIntegerParam('filter_id'));
$this->checkPermission($project, $filter);
if ($this->customFilterModel->remove($filter['id']))... | CWE-200 | 10 |
public static function getHelpVersionId($version) {
global $db;
return $db->selectValue('help_version', 'id', 'version="'.$version.'"');
} | CWE-74 | 1 |
protected function tearDown()
{
static::$functions = [];
static::$fopen = null;
static::$fread = null;
parent::tearDown();
} | CWE-330 | 12 |
public function Hello($host = '') {
$this->error = null; // so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Hello() without being connected");
return false;
}
// if hostname for HELO was not specified send default
if(empty($hos... | CWE-20 | 0 |
public function execute(&$params){
$model = new Actions;
$model->type = 'note';
$model->complete = 'Yes';
$model->associationId = $params['model']->id;
$model->associationType = $params['model']->module;
$model->actionDescription = $this->parseOption('comment', $param... | CWE-20 | 0 |
unset($sql, $parameters, $row);
}
//download compressed file
if (@sizeof($email_files) != 0) {
//define compressed file name
$compressed_filename = 'emails_'.date('Ymd_His').'.zip';
//compress email files
$command = 'zip -mj '.$_SESSION['server'... | CWE-77 | 14 |
public function getAcl($node) {
if (is_string($node)) {
$node = $this->server->tree->getNodeForPath($node);
}
$acl = parent::getAcl($node);
// Authenticated user have read access to all nodes, as node list only contains elements
// that user can read.
$acl[] = [
... | CWE-862 | 8 |
public function setModelAttributes(&$model,&$attributeList,&$params) {
$data = array ();
foreach($attributeList as &$attr) {
if(!isset($attr['name'],$attr['value']))
continue;
if(null !== $field = $model->getField($attr['name'])) {
// first do... | CWE-20 | 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-74 | 1 |
public function update_groupdiscounts() {
global $db;
if (empty($this->params['id'])) {
// look for existing discounts for the same group
$existing_id = $db->selectValue('groupdiscounts', 'id', 'group_id='.$this->params['group_id']);
if (!empty($existing_id)) flashAndFlow('er... | CWE-74 | 1 |
protected function tearDown()
{
static::$functions = [];
static::$fopen = null;
static::$fread = null;
parent::tearDown();
} | CWE-330 | 12 |
protected function doDBUpdates() {
$title = Title::newFromText( 'Template:Extension DPL' );
// Make sure template does not already exist
if ( !$title->exists() ) {
$wikipage = WikiPage::factory( $title );
$updater = $wikipage->newPageUpdater( User::newSystemUser( 'DynamicPageList3 extension' ) );
$cont... | CWE-400 | 2 |
public function setListAttributes( $attributes ) {
$this->listAttributes = \Sanitizer::fixTagAttributes( $attributes, 'ul' );
} | CWE-400 | 2 |
$banner->increaseImpressions();
}
}
// assign banner to the template and show it!
assign_to_template(array(
'banners'=>$banners
));
} | CWE-74 | 1 |
$count += $db->dropTable($basename);
}
flash('message', gt('Deleted').' '.$count.' '.gt('unused tables').'.');
expHistory::back();
} | CWE-74 | 1 |
public function saveconfig() {
global $db;
if (empty($this->params['id'])) return false;
$calcname = $db->selectValue('shippingcalculator', 'calculator_name', 'id='.$this->params['id']);
$calc = new $calcname($this->params['id']);
$conf = serialize($calc->parseConfig($this->... | CWE-74 | 1 |
public function testAuthCheckDecryptUser()
{
$GLOBALS['cfg']['Server']['auth_swekey_config'] = 'testConfigSwekey';
$GLOBALS['server'] = 1;
$_REQUEST['old_usr'] = '';
$_REQUEST['pma_username'] = '';
$_COOKIE['pmaServer-1'] = 'pmaServ1';
$_COOKIE['pmaUser-1'] = 'pma... | CWE-200 | 10 |
public function confirm()
{
$project = $this->getProject();
$this->response->html($this->helper->layout->project('action/remove', array(
'action' => $this->actionModel->getById($this->request->getIntegerParam('action_id')),
'available_events' => $this->eventManager->getA... | CWE-200 | 10 |
public function gc($force = false)
{
if ($force || mt_rand(0, 1000000) < $this->gcProbability) {
$this->db->createCommand()
->delete($this->cacheTable, '[[expire]] > 0 AND [[expire]] < ' . time())
->execute();
}
} | CWE-330 | 12 |
public function attributeLabels() {
return array(
'actionId' => Yii::t('actions','Action ID'),
'text' => Yii::t('actions','Action Text'),
);
} | CWE-20 | 0 |
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 |
static function encrypt($string, $key) {
$result = '';
for ($i=0; $i<strlen($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)+ord($keychar));
$result .= $char;
}
return base64_... | CWE-327 | 3 |
public function Login ($username = '', $password = '') {
if ($this->connected == false) {
$this->error = 'Not connected to POP3 server';
if ($this->do_debug >= 1) {
$this->displayErrors();
}
}
if (empty($username)) {
$username = $this->username;
}
if (empty($pass... | CWE-20 | 0 |
function reparent_standalone() {
$standalone = $this->section->find($this->params['page']);
if ($standalone) {
$standalone->parent = $this->params['parent'];
$standalone->update();
expSession::clearAllUsersSessionCache('navigation');
expHistory::... | 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 function test_empty_content_multiple_spaces() {
$result = $this->myxmlrpcserver->wp_newComment(
array(
1,
'administrator',
'administrator',
self::$post->ID,
array(
'content' => ' ',
),
)
);
$this->assertIXRError( $result );
$this->assertSame( 403, $result->code );
... | CWE-862 | 8 |
public function show()
{
$task = $this->getTask();
$subtask = $this->getSubtask();
$this->response->html($this->template->render('subtask_converter/show', array(
'subtask' => $subtask,
'task' => $task,
)));
} | CWE-200 | 10 |
function XMLRPCremoveNode($nodeID){
require_once(".ht-inc/privileges.php");
global $user;
if(!in_array("nodeAdmin", $user['privileges'])){
return array(
'status' => 'error',
'errorcode' => 56,
'errormsg' => 'User cannot administer nodes');
}
if(!checkUserH... | CWE-20 | 0 |
public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response)
{
if (\strpos((string) $response->getStatusCode(), '3') !== 0
|| !$response->hasHeader('Location')
) {
return $response;
}
$this->guardMax($request, $res... | CWE-200 | 10 |
public static function canImportData() {
return true;
}
| CWE-74 | 1 |
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-74 | 1 |
protected function generateVerifyCode()
{
if ($this->minLength > $this->maxLength) {
$this->maxLength = $this->minLength;
}
if ($this->minLength < 3) {
$this->minLength = 3;
}
if ($this->maxLength > 20) {
$this->maxLength = 20;
... | CWE-330 | 12 |
public function testCompilePathIsProperlyCreated()
{
$compiler = new BladeCompiler($this->getFiles(), __DIR__);
$this->assertEquals(__DIR__.'/'.sha1('foo').'.php', $compiler->getCompiledPath('foo'));
} | CWE-327 | 3 |
public function getDisplayName ($plural=true) {
return Yii::t('marketing', 'Web Form');
} | CWE-20 | 0 |
function __construct() {
$this->mDb = GlobalNewFilesHooks::getGlobalDB( DB_REPLICA, 'gnf_files' );
if ( $this->getRequest()->getText( 'sort', 'files_date' ) == 'files_date' ) {
$this->mDefaultDirection = IndexPager::DIR_DESCENDING;
} else {
$this->mDefaultDirection = IndexPager::DIR_ASCENDING;
}
pare... | CWE-20 | 0 |
foreach ($flatArray as $key => $value) {
$pattern = '/' . $key . '([^.]|$)/';
if (preg_match($pattern, $expression, $matches)) {
switch (gettype($flatArray[$key])) {
case 'boolean':
$expression = str_replace($key, $flatArray[$k... | CWE-74 | 1 |
public static function endReset( &$parser, $text ) {
if ( !self::$createdLinks['resetdone'] ) {
self::$createdLinks['resetdone'] = true;
foreach ( $parser->getOutput()->mCategories as $key => $val ) {
if ( array_key_exists( $key, self::$fixedCategories ) ) {
self::$fixedCategories[$key] = $val;
}
... | CWE-400 | 2 |
private function _getMetaTags()
{
$retval = '<meta charset="utf-8" />';
$retval .= '<meta name="referrer" content="none" />';
$retval .= '<meta name="robots" content="noindex,nofollow" />';
$retval .= '<meta http-equiv="X-UA-Compatible" content="IE=Edge">';
if (! $GLOBAL... | CWE-200 | 10 |
$parser->getOutput()->mTemplates[$nsp] = array_diff_assoc( $parser->getOutput()->mTemplates[$nsp], self::$createdLinks[1][$nsp] );
// echo ("<pre> elim: parser Tpls [$nsp] nachher = ". count($parser->getOutput()->mTemplates[$nsp]) ."</pre>\n");
if ( count( $parser->getOutput()->mTemplates[$nsp] ) == 0 ... | CWE-400 | 2 |
function XMLRPCgetResourceGroupPrivs($name, $type, $nodeid){
require_once(".ht-inc/privileges.php");
global $user;
if(! checkUserHasPriv("resourceGrant", $user['id'], $nodeid)){
return array('status' => 'error',
'errorcode' => 53,
'errormsg' => 'Unable to a... | CWE-20 | 0 |
public function upload() {
if (!AuthUser::hasPermission('file_manager_upload')) {
Flash::set('error', __('You do not have sufficient permissions to upload a file.'));
redirect(get_url('plugin/file_manager/browse/'));
}
// CSRF checks
if (isset($_POST[... | CWE-20 | 0 |
public static function validateNumber(
$path,
$values,
$allow_neg,
$allow_zero,
$max_value,
$error_string
) {
if ($values[$path] === '') {
return '';
}
if (intval($values[$path]) != $values[$path]
|| (! $allow_neg &... | CWE-200 | 10 |
static public function getHighestOrderNumber($_uid = 0) {
$where = '';
$sel_data = array();
if ($_uid > 0) {
$where = " WHERE `adminid` = :adminid";
$sel_data['adminid'] = $_uid;
}
$sql = "SELECT MAX(`logicalorder`) as `highestorder` FROM `" . TABLE_PANEL_TICKET_CATS . "`".$where.";";
$result_stmt =... | CWE-732 | 13 |
public function addGroupBy( $groupBy ) {
if ( empty( $groupBy ) ) {
throw new \MWException( __METHOD__ . ': An empty group by clause was passed.' );
}
$this->groupBy[] = $groupBy;
return true;
} | CWE-400 | 2 |
public function generateMessageFileName()
{
$time = microtime(true);
return date('Ymd-His-', $time) . sprintf('%04d', (int) (($time - (int) $time) * 10000)) . '-' . sprintf('%04d', mt_rand(0, 10000)) . '.eml';
} | CWE-330 | 12 |
foreach ($allusers as $uid) {
$u = user::getUserById($uid);
expPermissions::grant($u, 'manage', $sloc);
}
| CWE-74 | 1 |
public static function init( $settings = false ) {
if ( $settings === false ) {
global $wgDplSettings;
$settings = $wgDplSettings;
}
if ( !is_array( $settings ) ) {
throw new MWException( __METHOD__ . ": Invalid settings passed." );
}
self::$settings = array_merge( self::$settings, $settings );
... | CWE-400 | 2 |
self::removeLevel($kid->id);
}
}
| CWE-74 | 1 |
static function testLDAPConnection($auths_id, $replicate_id = -1) {
$config_ldap = new self();
$res = $config_ldap->getFromDB($auths_id);
// we prevent some delay...
if (!$res) {
return false;
}
//Test connection to a replicate
if ($replicate_id != -1) {
... | CWE-327 | 3 |
$curVal[$key] = $tp->post_toForm($val);
}
}
$target = e107::getUrl()->create('user/myprofile/edit',array('id'=>USERID));
$text = '<form method="post" action="'.$target.'" id="dataform" class="usersettings-form form-horizontal" enctype="multipart/form-data" autocomplete="off">';
//$text = (is_numeric(... | CWE-326 | 9 |
$tags = array_merge($matches[1], $tags);
}
$tags = array_unique($tags);
return $tags;
} | CWE-20 | 0 |
public function fixsessions() {
global $db;
// $test = $db->sql('CHECK TABLE '.$db->prefix.'sessionticket');
$fix = $db->sql('REPAIR TABLE '.$db->prefix.'sessionticket');
flash('message', gt('Sessions Table was Repaired'));
expHistory::back();
} | CWE-74 | 1 |
$link = str_replace(URL_FULL, '', makeLink(array('section' => $section->id)));
| CWE-74 | 1 |
function update_optiongroup_master() {
global $db;
$id = empty($this->params['id']) ? null : $this->params['id'];
$og = new optiongroup_master($id);
$oldtitle = $og->title;
$og->update($this->params);
// if the title of the master changed we should update th... | CWE-74 | 1 |
private function _createdby( $option ) {
$this->addTable( 'revision', 'creation_rev' );
$this->addTable( 'revision_actor_temp', 'creation_rev_actor' );
$this->_adduser( null, 'creation_rev_actor' );
$user = new \User;
$this->addWhere(
[
$this->DB->addQuotes( $user->newFromName( $option )->getActorId(... | CWE-400 | 2 |
$dplArg = $this->wgRequest->getVal( $arg, '' );
if ( $dplArg == '' ) {
$input = preg_replace( '/\{%' . $arg . ':(.*)%\}/U', '\1', $input );
$input = str_replace( '{%' . $arg . '%}', '', $input );
} else {
$input = preg_replace( '/\{%' . $arg . ':.*%\}/U ', $dplArg, $input );
$input = str_repla... | CWE-400 | 2 |
$this->where = array_merge( $this->where, $where );
} else {
throw new \MWException( __METHOD__ . ': An invalid where clause was passed.' );
return false;
}
return true;
} | CWE-400 | 2 |
public function assets_path($file = NULL, $path = NULL, $module = NULL, $absolute = NULL)
{
$cache = '';
if (!isset($absolute)) $absolute = $this->assets_absolute_path;
$CI = $this->_get_assets_config();
if ($this->asset_append_cache_timestamp AND in_array($path, $this->asset_append_cache_timestamp) AND !e... | CWE-74 | 1 |
public function behaviors() {
return array_merge(parent::behaviors(),array(
'X2LinkableBehavior'=>array(
'class'=>'X2LinkableBehavior',
'module'=>'marketing'
),
'ERememberFiltersBehavior' => array(
'class'=>'application.components.ERememberFiltersBehavior',
'defaults'=>array(),
'defaultS... | CWE-20 | 0 |
static public function customerHasTickets($_cid = 0) {
if ($_cid != 0) {
$result_stmt = Database::prepare("
SELECT `id` FROM `" . TABLE_PANEL_TICKETS . "` WHERE `customerid` = :cid"
);
Database::pexecute($result_stmt, array('cid' => $_cid));
$tickets = array();
while ($row = $result_stmt->fetch(... | CWE-732 | 13 |
function manage() {
expHistory::set('viewable', $this->params);
// $category = new storeCategory();
// $categories = $category->getFullTree();
//
// // foreach($categories as $i=>$val){
// // if (!empty($this->values) && in_ar... | CWE-74 | 1 |
public function isLocal() {
$localhosts = array('::1', '127.0.0.1', '0.0.0.0');
return (
in_array(server::get('SERVER_ADDR'), $localhosts) ||
server::get('SERVER_NAME') == 'localhost' ||
str::endsWith(server::get('SERVER_NAME'), '.localhost') ||
str::endsWith(server::get('SERVER_NAME')... | CWE-346 | 16 |
function searchName() { return gt('Webpage'); }
| CWE-74 | 1 |
public function getListStart() {
// increase start value of ordered lists at multi-column output
//The offset that comes from the URL parameter is zero based, but has to be +1'ed for display.
$offset = $this->getParameters()->getParameter( 'offset' ) + 1;
if ( $offset != 0 ) {
//@TODO: So this adds the tot... | CWE-400 | 2 |
function update() {
parent::update();
expSession::clearAllUsersSessionCache('navigation');
}
| CWE-74 | 1 |
static function displayname() {
return gt("e-Commerce Category Manager");
} | CWE-74 | 1 |
$connecttext = preg_replace("/#connectport#/", $connectport, $connecttext);
$connectMethods[$key]["connecttext"] = $connecttext;
}
return array('status' => 'ready',
'serverIP' => $serverIP,
'user' => $thisuser,
'password' => $passwd,
... | CWE-20 | 0 |
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-74 | 1 |
public function remove()
{
$this->checkCSRFParam();
$project = $this->getProject();
$swimlane_id = $this->request->getIntegerParam('swimlane_id');
if ($this->swimlaneModel->remove($project['id'], $swimlane_id)) {
$this->flash->success(t('Swimlane removed successfully... | CWE-200 | 10 |
private function get_lines() {
$data = "";
$endtime = 0;
/* If for some reason the fp is bad, don't inf loop */
if (!is_resource($this->smtp_conn)) {
return $data;
}
stream_set_timeout($this->smtp_conn, $this->Timeout);
if ($this->Timelimit > 0) {
$endtime = time() + $this->Tim... | CWE-20 | 0 |
public function testAuth()
{
if (! defined('PMA_TEST_HEADERS')) {
$this->markTestSkipped(
'Cannot redefine constant/function - missing runkit extension'
);
}
// case 1
$GLOBALS['cfg']['Server']['SignonURL'] = '';
ob_start();
... | CWE-200 | 10 |
function execute( $par ) {
$this->setHeaders();
$this->outputHeader();
$pager = new GlobalNewFilesPager();
$this->getOutput()->addParserOutputContent( $pager->getFullOutput() );
} | CWE-20 | 0 |
private function _notmodifiedby( $option ) {
$user = new \User;
$this->addWhere( 'NOT EXISTS (SELECT 1 FROM ' . $this->tableNames['revision_actor_temp'] . ' WHERE ' . $this->tableNames['revision_actor_temp'] . '.revactor_page=page_id AND ' . $this->tableNames['revision_actor_temp'] . '.revactor_actor = ' . $this->... | CWE-400 | 2 |
static public function addCategory($_category = null, $_admin = 1, $_order = 1) {
if ($_category != null
&& $_category != ''
) {
if ($_order < 1) {
$_order = 1;
}
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_TICKET_CATS . "` SET
`name` = :name,
`adminid` = :adminid,
... | CWE-732 | 13 |
$iloc = expUnserialize($container->internal);
if ($db->selectObject('sectionref',"module='".$iloc->mod."' AND source='".$iloc->src."'") == null) {
// There is no sectionref for this container. Populate sectionref
if ($container->external != "N;") {
$newSecRef = new stdClass... | CWE-74 | 1 |
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 |
private function _notlinksto( $option ) {
if ( $this->parameters->getParameter( 'distinct' ) == 'strict' ) {
$this->addGroupBy( 'page_title' );
}
if ( count( $option ) ) {
$where = $this->tableNames['page'] . '.page_id NOT IN (SELECT ' . $this->tableNames['pagelinks'] . '.pl_from FROM ' . $this->tableNames... | CWE-400 | 2 |
public static function setArray( $arg ) {
$numargs = count( $arg );
if ( $numargs < 5 ) {
return '';
}
$var = trim( $arg[2] );
$value = $arg[3];
$delimiter = $arg[4];
if ( $var == '' ) {
return '';
}
if ( $value == '' ) {
self::$memoryArray[$var] = [];
return;
}
if ( $delimi... | CWE-400 | 2 |
$rndString = function ($len = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomString = '';
for ($i = 0; $i < $len; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
r... | CWE-330 | 12 |
public function actionDeleteDropdown() {
$dropdowns = Dropdowns::model()->findAll();
if (isset($_POST['dropdown'])) {
if ($_POST['dropdown'] != Actions::COLORS_DROPDOWN_ID) {
$model = Dropdowns::model()->findByPk($_POST['dropdown']);
$model->delete();
... | CWE-20 | 0 |
public function setPageTextMatchRegex( array $pageTextMatchRegex = [] ) {
$this->pageTextMatchRegex = (array)$pageTextMatchRegex;
} | CWE-400 | 2 |
function delete_recurring() {
$item = $this->event->find('first', 'id=' . $this->params['id']);
if ($item->is_recurring == 1) { // need to give user options
expHistory::set('editable', $this->params);
assign_to_template(array(
'checked_date' => $this->par... | CWE-74 | 1 |
protected function markCompleted($endStatus, ServiceResponse $serviceResponse, $gatewayMessage)
{
parent::markCompleted($endStatus, $serviceResponse, $gatewayMessage);
$this->createMessage(Message\PurchasedResponse::class, $gatewayMessage);
ErrorHandling::safeExtend($this->payment, 'onCa... | CWE-436 | 5 |
public function AddReplyTo($address, $name = '') {
return $this->AddAnAddress('Reply-To', $address, $name);
} | CWE-20 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.