{"code": "\tprotected function _archive($dir, $files, $name, $arc) {\n\t\tdie('Not yet implemented. (_archive)');\n\t\treturn false;\n\t}", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"}
{"code": "\tfunction check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {\n\t\tif ( -1 == $action ) {\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );\n\t\t}\n\n\t\t$adminurl = strtolower( admin_url() );\n\t\t$referer = strtolower( wp_get_referer() );\n\t\t$result = isset( $_REQUEST[ $query_arg ] ) ? wp_verify_nonce( $_REQUEST[ $query_arg ], $action ) : false;\n\n\t\t/**\n\t\t * Fires once the admin request has been validated or not.\n\t\t *\n\t\t * @since 1.5.1\n\t\t *\n\t\t * @param string $action The nonce action.\n\t\t * @param false|int $result False if the nonce is invalid, 1 if the nonce is valid and generated between\n\t\t * 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.\n\t\t */\n\t\tdo_action( 'check_admin_referer', $action, $result );\n\n\t\tif ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {\n\t\t\twp_nonce_ays( $action );\n\t\t\tdie();\n\t\t}\n\n\t\treturn $result;\n\t}", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-843", "cwe_name": "Access of Resource Using Incompatible Type ('Type Confusion')", "description": "The program allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.", "url": "https://cwe.mitre.org/data/definitions/843.html", "label_name": "vulnerable"}
{"code": " $GLOBALS['PMA_Config']->removeCookie('pmaPass-' . $key);\n if (isset($_COOKIE['pmaPass-' . $key])) {\n unset($_COOKIE['pmaPass-' . $key]);\n }\n }\n } else {\n $GLOBALS['PMA_Config']->removeCookie(\n 'pmaPass-' . $GLOBALS['server']\n );\n if (isset($_COOKIE['pmaPass-' . $GLOBALS['server']])) {\n unset($_COOKIE['pmaPass-' . $GLOBALS['server']]);\n }\n }\n parent::logOut();\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-200", "cwe_name": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "url": "https://cwe.mitre.org/data/definitions/200.html", "label_name": "safe"}
{"code": "function html_split_string($string, $length = 70, $forgiveness = 10) {\n\t$new_string = '';\n\t$j = 0;\n\t$done = false;\n\n\twhile (!$done) {\n\t\tif (strlen($string) > $length) {\n\t\t\tfor($i = 0; $i < $forgiveness; $i++) {\n\t\t\t\tif (substr($string, $length-$i, 1) == ' ') {\n\t\t\t\t\t$new_string .= substr($string, 0, $length-$i) . '
';\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$string = substr($string, $length-$i);\n\t\t} else {\n\t\t\t$new_string .= $string;\n\t\t\t$done = true;\n\t\t}\n\n\t\t$j++;\n\t\tif ($j > 4) break;\n\t}\n\n\treturn $new_string;\n}", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "safe"}
{"code": " public function getHeader()\n {\n $html = '\n
\n\t\t\t \n\t\t\tID );\n\t\t\techo wp_basename( $file );\n\t\t\t?>\n\t\t
\n\t\tid));\n $ret .= scan_container($cLoc, $page->id);\n $ret .= scan_page($page->id);\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " return rawurldecode(explode('=', $part)[0]) !== $decodedKey;\n });", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public function prepareGenerator($config) {\n $all = $config->getAll();\n $context = new HTMLPurifier_Context();\n $this->generator = new HTMLPurifier_Generator($config, $context);\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "safe"} {"code": " public static function parseAndTrimExport($str, $isHTML = false) { //\ufffdDeath from above\ufffd? \ufffd\n //echo \"1\n\t\t\t\t\t\t\t ' graph_width='' graph_height=''> \n\t\t\t\t\t\t\t\" . htmlspecialchars($graph['title_cache']) . '' : '');?>\n\t\t\t\t\t\t | \n\t\t\t\t\t\t' class='noprint graphDrillDown'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t | \n\t\t\t\t\t
You can now keep W3 Total Cache up-to-date without having to worry about new features breaking your website. There will be more releases with bug fixes, security fixes and settings updates.
\nAlso, you can now try out our new features as soon as they\\'re ready. %s to enable \"edge mode\" and unlock pre-release features. %s
', 'w3-total-cache')\n ,'_page .'&w3tc_edge_mode_enable').'\" class=\"button\">' . __('Click Here', 'w3-total-cache') . ''\n , w3_button_hide_note(__('Hide this message', 'w3-total-cache'), 'edge_mode', '', true,'','w3tc_default_hide_note_custom')\n );\n w3_e_notification_box($message, 'edge-mode');\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-352", "cwe_name": "Cross-Site Request Forgery (CSRF)", "description": "The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.", "url": "https://cwe.mitre.org/data/definitions/352.html", "label_name": "safe"} {"code": " public function testCanConstructWithStatusCode()\n {\n $r = new Response(404);\n $this->assertSame(404, $r->getStatusCode());\n $this->assertSame('Not Found', $r->getReasonPhrase());\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": "function teampass_decrypt_pw($encrypted, $salt, $rand_key, $itcount = 2072)\n{\n $encrypted = base64_decode($encrypted);\n $pass_salt = substr($encrypted, -64);\n $encrypted = substr($encrypted, 0, -64);\n $key = teampass_pbkdf2_hash($salt, $pass_salt, $itcount, 16, 32);\n $iv = base64_decode(substr($encrypted, 0, 43) . '==');\n $encrypted = substr($encrypted, 43);\n $mac = substr($encrypted, -64);\n $encrypted = substr($encrypted, 0, -64);\n if ($mac !== hash_hmac('sha256', $encrypted, $salt)) return null;\n return substr(rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $encrypted, 'ctr', $iv), \"\\0\\4\"), strlen($rand_key));\n}", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " public function confirm()\n {\n $project = $this->getProject();\n $swimlane = $this->getSwimlane();\n\n $this->response->html($this->helper->layout->project('swimlane/remove', array(\n 'project' => $project,\n 'swimlane' => $swimlane,\n )));\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-639", "cwe_name": "Authorization Bypass Through User-Controlled Key", "description": "The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.", "url": "https://cwe.mitre.org/data/definitions/639.html", "label_name": "vulnerable"} {"code": "\tpublic function remove($key)\n\t{\n\t\t$session =& $this->getSessionRef($key);\n\t\tunset($session);\n\t\t\n\t\treturn $this;\n\t}", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " $link = str_replace(URL_FULL, '', makeLink(array('section' => $section->id)));", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " function scan_page($parent_id) {\n global $db;\n\n $sections = $db->selectObjects('section','parent=' . $parent_id);\n $ret = '';\n foreach ($sections as $page) {\n $cLoc = serialize(expCore::makeLocation('container','@section' . $page->id));\n $ret .= scan_container($cLoc, $page->id);\n $ret .= scan_page($page->id);\n }\n return $ret;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public function toolbar() {\n// global $user;\n\n $menu = array();\n\t\t$dirs = array(\n\t\t\tBASE.'framework/modules/administration/menus',\n\t\t\tBASE.'themes/'.DISPLAY_THEME.'/modules/administration/menus'\n\t\t);\n\n\t\tforeach ($dirs as $dir) {\n\t\t if (is_readable($dir)) {\n\t\t\t $dh = opendir($dir);\n\t\t\t while (($file = readdir($dh)) !== false) {\n\t\t\t\t if (substr($file,-4,4) == '.php' && is_readable($dir.'/'.$file) && is_file($dir.'/'.$file)) {\n\t\t\t\t\t $menu[substr($file,0,-4)] = include($dir.'/'.$file);\n if (empty($menu[substr($file,0,-4)])) unset($menu[substr($file,0,-4)]);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t}\n\n // sort the top level menus alphabetically by filename\n\t\tksort($menu);\t\t\n\t\t$sorted = array();\n\t\tforeach($menu as $m) $sorted[] = $m;\n \n // slingbar position\n if (isset($_COOKIE['slingbar-top'])){\n $top = $_COOKIE['slingbar-top'];\n } else {\n $top = SLINGBAR_TOP;\n }\n \n\t\tassign_to_template(array(\n 'menu'=>(bs3()) ? $sorted : json_encode($sorted),\n \"top\"=>$top\n ));\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " public static function navtojson() {\r\n return json_encode(self::navhierarchy());\r\n }\r", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " public static function _date2timestamp( $datetime, $wtz=null ) {\r\n if( !isset( $datetime['hour'] )) $datetime['hour'] = 0;\r\n if( !isset( $datetime['min'] )) $datetime['min'] = 0;\r\n if( !isset( $datetime['sec'] )) $datetime['sec'] = 0;\r\n if( empty( $wtz ) && ( !isset( $datetime['tz'] ) || empty( $datetime['tz'] )))\r\n return mktime( $datetime['hour'], $datetime['min'], $datetime['sec'], $datetime['month'], $datetime['day'], $datetime['year'] );\r\n $output = $offset = 0;\r\n if( empty( $wtz )) {\r\n if( iCalUtilityFunctions::_isOffset( $datetime['tz'] )) {\r\n $offset = iCalUtilityFunctions::_tz2offset( $datetime['tz'] ) * -1;\r\n $wtz = 'UTC';\r\n }\r\n else\r\n $wtz = $datetime['tz'];\r\n }\r\n if(( 'Z' == $wtz ) || ( 'GMT' == strtoupper( $wtz )))\r\n $wtz = 'UTC';\r\n try {\r\n $strdate = sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $datetime['year'], $datetime['month'], $datetime['day'], $datetime['hour'], $datetime['min'], $datetime['sec'] );\r\n $d = new DateTime( $strdate, new DateTimeZone( $wtz ));\r\n if( 0 != $offset ) // adjust for offset\r\n $d->modify( $offset.' seconds' );\r\n $output = $d->format( 'U' );\r\n unset( $d );\r\n }\r\n catch( Exception $e ) {\r\n $output = mktime( $datetime['hour'], $datetime['min'], $datetime['sec'], $datetime['month'], $datetime['day'], $datetime['year'] );\r\n }\r\n return $output;\r\n }\r", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " foreach ($val as $k => $v) {\n unset($process[$key][$k]);\n $stripTags = \\in_array($k, $stripTagsWhiteList) ? false : $stripTagsConf;\n $allowedHtmlTags = \\array_key_exists($k, $allowanceList) ? $allowanceList[$k][self::ALLOWED_HTML_TAGS_KEY] : [];\n $allowedAttributes = \\array_key_exists($k, $allowanceList) ? $allowanceList[$k][self::ALLOWED_ATTRIBUTES_KEY] : [];\n\n if (\\is_string($k)) {\n $filteredKey = self::filterValue($k, $regex, $stripTags, $allowedHtmlTags, $allowedAttributes);\n } else {\n $filteredKey = $k;\n }\n\n if ($filteredKey === '' || $filteredKey === null) {\n continue;\n }\n\n if (\\is_array($v)) {\n $process[$key][$filteredKey] = self::filterArrayValue($v, $regex, $stripTags, $allowedHtmlTags, $allowedAttributes);\n continue;\n }\n\n if (\\is_string($v)) {\n $process[$key][$filteredKey] = self::filterValue($v, $regex, $stripTags, $allowedHtmlTags, $allowedAttributes);\n continue;\n }\n\n $process[$key][$filteredKey] = $v;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "safe"} {"code": " public function manage() {\n expHistory::set('manageable', $this->params);\n\n // build out a SQL query that gets all the data we need and is sortable.\n $sql = 'SELECT b.*, c.title as companyname, f.expfiles_id as file_id ';\n $sql .= 'FROM '.DB_TABLE_PREFIX.'_banner b, '.DB_TABLE_PREFIX.'_companies c , '.DB_TABLE_PREFIX.'_content_expFiles f ';\n $sql .= 'WHERE b.companies_id = c.id AND (b.id = f.content_id AND f.content_type=\"banner\")';\n\n\t\t$page = new expPaginator(array(\n\t\t\t'model'=>'banner',\n\t\t\t'sql'=>$sql,\n\t\t\t'order'=>'title',\n 'page'=>(isset($this->params['page']) ? $this->params['page'] : 1),\n 'controller'=>$this->params['controller'],\n 'action'=>$this->params['action'],\n 'src'=>$this->loc->src,\n\t\t\t'columns'=>array(\n gt('Title')=>'title',\n gt('Company')=>'companyname',\n gt('Impressions')=>'impressions',\n gt('Clicks')=>'clicks'\n )\n ));\n\n\t\tassign_to_template(array(\n 'page'=>$page\n ));\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " function restart($sMessage = '')\n {\n $_COOKIE['sessionID'] = phpAds_SessionRegenerateId();\n OA_Auth::displayLogin($sMessage, $_COOKIE['sessionID']);\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-384", "cwe_name": "Session Fixation", "description": "Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.", "url": "https://cwe.mitre.org/data/definitions/384.html", "label_name": "safe"} {"code": " public static function Xclean($vars)\n {\n $var = htmlspecialchars_decode($vars, ENT_QUOTES | ENT_HTML5);\n // $var = html_entity_decode($vars);\n return $var;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public function __construct() {\n $this->parser = new HTMLPurifier_URIParser();\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "safe"} {"code": " private function getSwimlane()\n {\n $swimlane = $this->swimlaneModel->getById($this->request->getIntegerParam('swimlane_id'));\n\n if (empty($swimlane)) {\n throw new PageNotFoundException();\n }\n\n return $swimlane;\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-639", "cwe_name": "Authorization Bypass Through User-Controlled Key", "description": "The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.", "url": "https://cwe.mitre.org/data/definitions/639.html", "label_name": "vulnerable"} {"code": " public function confirm()\n {\n $project = $this->getProject();\n $filter = $this->customFilterModel->getById($this->request->getIntegerParam('filter_id'));\n\n $this->response->html($this->helper->layout->project('custom_filter/remove', array(\n 'project' => $project,\n 'filter' => $filter,\n 'title' => t('Remove a custom filter')\n )));\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-639", "cwe_name": "Authorization Bypass Through User-Controlled Key", "description": "The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.", "url": "https://cwe.mitre.org/data/definitions/639.html", "label_name": "vulnerable"} {"code": " $logo = \"\";\n }else{\n $logo = \"\";\n }\n return $logo;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-352", "cwe_name": "Cross-Site Request Forgery (CSRF)", "description": "The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.", "url": "https://cwe.mitre.org/data/definitions/352.html", "label_name": "safe"} {"code": " public static function getHelpVersion($version_id) {\n global $db;\n\n return $db->selectValue('help_version', 'version', 'id=\"'.intval($version_id).'\"');\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public function confirm()\n {\n $task = $this->getTask();\n $link = $this->getTaskLink();\n\n $this->response->html($this->template->render('task_internal_link/remove', array(\n 'link' => $link,\n 'task' => $task,\n )));\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-200", "cwe_name": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "url": "https://cwe.mitre.org/data/definitions/200.html", "label_name": "vulnerable"} {"code": " $count += $db->dropTable($basename);\n }\n \n flash('message', gt('Deleted').' '.$count.' '.gt('unused tables').'.');\n expHistory::back();\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-74", "cwe_name": "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')", "description": "The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/74.html", "label_name": "vulnerable"} {"code": " function selectArraysBySql($sql) {\n $res = @mysqli_query($this->connection, $this->injectProof($sql));\n if ($res == null)\n return array();\n $arrays = array();\n for ($i = 0, $iMax = mysqli_num_rows($res); $i < $iMax; $i++)\n $arrays[] = mysqli_fetch_assoc($res);\n return $arrays;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-74", "cwe_name": "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')", "description": "The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/74.html", "label_name": "safe"} {"code": "\tstatic function validUTF($string) {\n\t\tif(!mb_check_encoding($string, 'UTF-8') OR !($string === mb_convert_encoding(mb_convert_encoding($string, 'UTF-32', 'UTF-8' ), 'UTF-8', 'UTF-32'))) {\n\t\t\treturn false;\n\t\t}\t\t\n\t\treturn true;\n\t}", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": "\t\t\t$user = db_fetch_cell_prepared('SELECT username FROM user_auth WHERE id = ?', array($check['user']), 'username');\n\t\t\tform_alternate_row('line' . $check['id']);\n\t\t\t$name = get_data_source_title($check['datasource']);\n\t\t\t$title = $name;\n\t\t\tif (strlen($name) > 50) {\n\t\t\t\t$name = substr($name, 0, 50);\n\t\t\t}\n\t\t\tform_selectable_cell('' . $name . '', $check['id']);\n\t\t\tform_selectable_cell($user, $check['id']);\n\t\t\tform_selectable_cell(date('F j, Y, G:i', $check['started']), $check['id']);\n\t\t\tform_selectable_cell($check['datasource'], $check['id']);\n\t\t\tform_selectable_cell(debug_icon(($check['done'] ? (strlen($issue_line) ? 'off' : 'on' ) : '')), $check['id'], '', 'text-align: center;');\n\t\t\tform_selectable_cell(debug_icon($info['rrd_writable']), $check['id'], '', 'text-align: center;');\n\t\t\tform_selectable_cell(debug_icon($info['rrd_exists']), $check['id'], '', 'text-align: center;');\n\t\t\tform_selectable_cell(debug_icon($info['active']), $check['id'], '', 'text-align: center;');\n\t\t\tform_selectable_cell(debug_icon($info['rrd_match']), $check['id'], '', 'text-align: center;');\n\t\t\tform_selectable_cell(debug_icon($info['valid_data']), $check['id'], '', 'text-align: center;');\n\t\t\tform_selectable_cell(debug_icon(($info['rra_timestamp2'] != '' ? 1 : '')), $check['id'], '', 'text-align: center;');\n\t\t\tform_selectable_cell('' . html_escape(strlen(trim($issue_line)) ? $issue_line : '' . $this->locale->getMessage('ErrorCollector: No errors') . '
';\n } else {\n return '\";\n\tif (isset($check) && is_array($check)) {\n\t\tprint_r($check);\n\t}\n\tprint \"\";\n*/\n\n}", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "vulnerable"} {"code": " $q = self::query($sql);\n }\n\n return true;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public function testRedirectLinkGeneration () {\n Yii::app()->controller = new MarketingController (\n 'campaign', new MarketingModule ('campaign', null));\n $_SERVER['SERVER_NAME'] = 'localhost';\n $cmb = $this->instantiate();\n $contact = $this->contacts('testUser_unsent');\n $campaign = $this->campaign('redirectLinkGeneration');\n $url = preg_replace ('/^[^\"]*\"([^\"]*)\".*$/', '$1', $campaign->content);\n list($subject,$message,$uniqueId) = $cmb->prepareEmail(\n $this->campaign('redirectLinkGeneration'),\n $contact);\n $this->assertRegExp ('/'.preg_quote (urlencode ($url)).'/', $message);\n\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-20", "cwe_name": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "url": "https://cwe.mitre.org/data/definitions/20.html", "label_name": "safe"} {"code": " public function __construct(Database $database, $cookiePrefix = '')\n {\n parent::__construct($database, TBL_SESSIONS, 'ses');\n\n // determine session id\n if (array_key_exists(COOKIE_PREFIX . '_SESSION_ID', $_COOKIE)) {\n $sessionId = $_COOKIE[COOKIE_PREFIX . '_SESSION_ID'];\n } else {\n $sessionId = session_id();\n }\n\n $this->cookieAutoLoginId = $cookiePrefix . '_AUTO_LOGIN_ID';\n\n if (is_int($sessionId)) {\n $this->readDataById($sessionId);\n } else {\n $this->readDataByColumns(array('ses_session_id' => $sessionId));\n\n if ($this->newRecord) {\n // if PHP session id was commited then store them in that field\n $this->setValue('ses_session_id', $sessionId);\n $this->setValue('ses_timestamp', DATETIME_NOW);\n }\n }\n\n // check for a valid auto login\n $this->refreshAutoLogin();\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-613", "cwe_name": "Insufficient Session Expiration", "description": "According to WASC, \"Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.\"", "url": "https://cwe.mitre.org/data/definitions/613.html", "label_name": "vulnerable"} {"code": " public function update()\n {\n try {\n $_recipients = array();\n if ($this->recipients != null) {\n foreach ($this->recipients as $_r) {\n $_recipients[$_r->id] = $_r->sname . ' <' . $_r->email . '>';\n }\n }\n\n $sender = ($this->sender === 0) ?\n new Expression('NULL') : $this->sender;\n $sender_name = ($this->sender_name === null) ?\n new Expression('NULL') : $this->sender_name;\n $sender_address = ($this->sender_address === null) ?\n new Expression('NULL') : $this->sender_address;\n\n $values = array(\n 'mailing_sender' => $sender,\n 'mailing_sender_name' => $sender_name,\n 'mailing_sender_address' => $sender_address,\n 'mailing_subject' => $this->subject,\n 'mailing_body' => $this->message,\n 'mailing_date' => $this->date,\n 'mailing_recipients' => serialize($_recipients),\n 'mailing_sent' => ($this->sent) ?\n true :\n ($this->zdb->isPostgres() ? 'false' : 0)\n );\n\n $update = $this->zdb->update(self::TABLE);\n $update->set($values);\n $update->where(self::PK . ' = ' . $this->mailing->history_id);\n $this->zdb->execute($update);\n return true;\n } catch (Throwable $e) {\n Analog::log(\n 'An error occurend updating Mailing | ' . $e->getMessage(),\n Analog::ERROR\n );\n throw $e;\n }\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " public function execute(&$params){\n $model = new Actions;\n $model->type = 'note';\n $model->complete = 'Yes';\n $model->associationId = $params['model']->id;\n $model->associationType = $params['model']->module;\n $model->actionDescription = $this->parseOption('comment', $params);\n $model->assignedTo = $this->parseOption('assignedTo', $params);\n $model->completedBy = $this->parseOption('assignedTo', $params);\n\n if(empty($model->assignedTo) && $params['model']->hasAttribute('assignedTo')){\n $model->assignedTo = $params['model']->assignedTo;\n $model->completedBy = $params['model']->assignedTo;\n }\n\n if($params['model']->hasAttribute('visibility'))\n $model->visibility = $params['model']->visibility;\n $model->createDate = time();\n $model->completeDate = time();\n\n if($model->save()){\n return array(\n true,\n Yii::t('studio', 'View created action: ').$model->getLink());\n }else{\n return array(false, array_shift($model->getErrors()));\n }\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "vulnerable"} {"code": " function updateObject($object, $table, $where=null, $identifier='id', $is_revisioned=false) {\n\n if ($is_revisioned) {\n $object->revision_id++;\n //if ($table==\"text\") eDebug($object);\n $res = $this->insertObject($object, $table);\n //if ($table==\"text\") eDebug($object,true); \n $this->trim_revisions($table, $object->$identifier, WORKFLOW_REVISION_LIMIT);\n return $res;\n }\n $sql = \"UPDATE \" . $this->prefix . \"$table SET \";\n foreach (get_object_vars($object) as $var => $val) {\n //We do not want to save any fields that start with an '_'\n //if($is_revisioned && $var=='revision_id') $val++;\n if ($var{0} != '_') {\n if (is_array($val) || is_object($val)) {\n $val = serialize($val); \n $sql .= \"`$var`='\".$val.\"',\";\n } else {\n $sql .= \"`$var`='\".mysqli_real_escape_string($this->connection,$val).\"',\";\n }\n }\n }\n $sql = substr($sql, 0, -1) . \" WHERE \";\n if ($where != null)\n $sql .= $where;\n else\n $sql .= \"`\" . $identifier . \"`=\" . $object->$identifier;\n //if ($table == 'text') eDebug($sql,true); \n $res = (@mysqli_query($this->connection, $sql) != false);\n return $res;\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " public function testDisplayBlocksAcceptTemplateOnlyAsBlocks()\n {\n $template = $this->getMockForAbstractClass('Twig_Template', array(), '', false);\n $template->displayBlock('foo', array(), array('foo' => array(new stdClass(), 'foo')));\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-264", "cwe_name": "Permissions, Privileges, and Access Controls", "description": "Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.", "url": "https://cwe.mitre.org/data/definitions/264.html", "label_name": "safe"} {"code": " private function _getMetaTags()\n {\n $retval = '';\n $retval .= '';\n $retval .= '';\n $retval .= '';\n return $retval;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-20", "cwe_name": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "url": "https://cwe.mitre.org/data/definitions/20.html", "label_name": "safe"} {"code": " public function delete() {\n global $db, $history;\n \n /* The global constants can be overriden by passing appropriate params */ \n //sure wish I could do this once in the constructor. sadly $this->params[] isn't set yet\n $require_login = empty($this->params['require_login']) ? SIMPLENOTE_REQUIRE_LOGIN : $this->params['require_login'];\n $require_approval = empty($this->params['require_approval']) ? SIMPLENOTE_REQUIRE_APPROVAL : $this->params['require_approval'];\n $require_notification = empty($this->params['require_notification']) ? SIMPLENOTE_REQUIRE_NOTIFICATION : $this->params['require_notification'];\n $notification_email = empty($this->params['notification_email']) ? SIMPLENOTE_NOTIFICATION_EMAIL : $this->params['notification_email'];\n \n if (empty($this->params['id'])) {\n flash('error', gt('Missing id for the comment you would like to delete'));\n $lastUrl = expHistory::getLast('editable');\n }\n \n // delete the note\n $simplenote = new expSimpleNote($this->params['id']);\n $rows = $simplenote->delete();\n \n // delete the assocication too\n $db->delete($simplenote->attachable_table, 'expsimplenote_id='.$this->params['id']); \n \n // send the user back where they came from.\n $lastUrl = expHistory::getLast('editable');\n if (!empty($this->params['tab']))\n {\n $lastUrl .= \"#\".$this->params['tab'];\n }\n redirect_to($lastUrl);\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " public function testResolvesUris($base, $rel, $expected)\n {\n $uri = new Uri($base);\n $actual = Uri::resolve($uri, $rel);\n $this->assertSame($expected, (string) $actual);\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " function autoLogin()\n {\n $oPlugin = OA_Auth::staticGetAuthPlugin();\n\n phpAds_SessionStart();\n\n // No auto-login if auth is external\n if (empty($oPlugin) || (get_class($oPlugin) != 'Plugins_Authentication')) {\n phpAds_SessionDataDestroy();\n return;\n }\n\n $adminAccountId = OA_Dal_ApplicationVariables::get('admin_account_id');\n if (isset($adminAccountId)) {\n // Fetch the user linked to the admin account\n $doUser = OA_Dal::factoryDO('users');\n $doAUA = OA_Dal::factoryDO('account_user_assoc');\n $doAUA->account_id = $adminAccountId;\n $doUser->joinAdd($doAUA);\n $doUser->find();\n if ($doUser->fetch()) {\n phpAds_SessionRegenerateId();\n phpAds_SessionDataRegister(OA_Auth::getSessionData($doUser));\n phpAds_SessionDataStore();\n }\n }\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-384", "cwe_name": "Session Fixation", "description": "Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.", "url": "https://cwe.mitre.org/data/definitions/384.html", "label_name": "safe"} {"code": " public function actionGetItems(){\n $sql = 'SELECT id, name as value FROM x2_products WHERE name LIKE :qterm ORDER BY name ASC';\n $command = Yii::app()->db->createCommand($sql);\n $qterm = $_GET['term'].'%';\n $command->bindParam(\":qterm\", $qterm, PDO::PARAM_STR);\n $result = $command->queryAll();\n echo CJSON::encode($result); exit;\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "vulnerable"} {"code": " public function __construct() {\n $this->pop_conn = 0;\n $this->connected = false;\n $this->error = null;\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-20", "cwe_name": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "url": "https://cwe.mitre.org/data/definitions/20.html", "label_name": "vulnerable"} {"code": " public function setObjectSrc(Response $response)\n {\n if (config('app.allow_content_scripts')) {\n return;\n }\n\n $response->headers->set('Content-Security-Policy', 'object-src \\'self\\'', false);\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "vulnerable"} {"code": " function captureAuthorization() {\n //eDebug($this->params,true);\n $order = new order($this->params['id']);\n /*eDebug($this->params); \n //eDebug($order,true);*/\n //eDebug($order,true);\n //$billing = new billing();\n\n //eDebug($billing, true);\n //$billing->calculator = new $calcname($order->billingmethod[0]->billingcalculator_id);\n $calc = $order->billingmethod[0]->billingcalculator->calculator;\n $calc->config = $order->billingmethod[0]->billingcalculator->config;\n\n //$calc = new $calc-\n //eDebug($calc,true);\n if (!method_exists($calc, 'delayed_capture')) {\n flash('error', gt('The Billing Calculator does not support delayed capture'));\n expHistory::back();\n }\n\n $result = $calc->delayed_capture($order->billingmethod[0], $this->params['capture_amt'], $order);\n\n if (empty($result->errorCode)) {\n flash('message', gt('The authorized payment was successfully captured'));\n expHistory::back();\n\n } else {\n flash('error', gt('An error was encountered while capturing the authorized payment.') . '
(.*?)<\\/pre>/ms', \"removeBr\", $text);\n \t$text = preg_replace('/(.*?)<\\/pre><\\/p>/ms', \"\\\\1\", $text);\n\n \t$text = preg_replace_callback('/
You can now keep W3 Total Cache up-to-date without having to worry about new features breaking your website. There will be more releases with bug fixes, security fixes and settings updates.
\nAlso, you can now try out our new features as soon as they\\'re ready. %s to enable \"edge mode\" and unlock pre-release features. %s
', 'w3-total-cache')\n ,'_page .'&w3tc_edge_mode_enable').'\" class=\"button\">' . __('Click Here', 'w3-total-cache') . ''\n , w3_button_hide_note(__('Hide this message', 'w3-total-cache'), 'edge_mode', '', true,'','w3tc_default_hide_note_custom')\n );\n w3_e_notification_box($message, 'edge-mode');\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-352", "cwe_name": "Cross-Site Request Forgery (CSRF)", "description": "The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.", "url": "https://cwe.mitre.org/data/definitions/352.html", "label_name": "vulnerable"} {"code": " protected function getSwimlane(array $project)\n {\n $swimlane = $this->swimlaneModel->getById($this->request->getIntegerParam('swimlane_id'));\n\n if (empty($swimlane)) {\n throw new PageNotFoundException();\n }\n\n if ($swimlane['project_id'] != $project['id']) {\n throw new AccessForbiddenException();\n }\n\n return $swimlane;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-639", "cwe_name": "Authorization Bypass Through User-Controlled Key", "description": "The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.", "url": "https://cwe.mitre.org/data/definitions/639.html", "label_name": "safe"} {"code": "\tpublic function manage_versions() {\n\t expHistory::set('manageable', $this->params);\n\n\t $hv = new help_version();\n\t $current_version = $hv->find('first', 'is_current=1');\n\n\t $sql = 'SELECT hv.*, COUNT(h.title) AS num_docs FROM '.DB_TABLE_PREFIX.'_help h ';\n\t $sql .= 'RIGHT JOIN '.DB_TABLE_PREFIX.'_help_version hv ON h.help_version_id=hv.id GROUP BY hv.version';\n\n\t $page = new expPaginator(array(\n 'sql'=>$sql,\n 'limit'=>30,\n 'order' => (isset($this->params['order']) ? $this->params['order'] : 'version'),\n 'dir' => (isset($this->params['dir']) ? $this->params['dir'] : 'DESC'),\n 'page'=>(isset($this->params['page']) ? $this->params['page'] : 1),\n 'controller'=>$this->baseclassname,\n 'action'=>$this->params['action'],\n 'src'=>$this->loc->src,\n 'columns'=>array(\n gt('Version')=>'version',\n gt('Title')=>'title',\n gt('Current')=>'is_current',\n gt('# of Docs')=>'num_docs'\n ),\n ));\n\n\t assign_to_template(array(\n 'current_version'=>$current_version,\n 'page'=>$page\n ));\n\t}", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public static function dropdown($vars) {\n if(is_array($vars)){\n //print_r($vars);\n $name = $vars['name'];\n $where = \"WHERE \";\n if(isset($vars['parent'])) {\n $where .= \" `parent` = '{$vars['parent']}' \";\n }else{\n $where .= \"1 \";\n }\n $order_by = \"ORDER BY \";\n if(isset($vars['order_by'])) {\n $order_by .= \" {$vars['order_by']} \";\n }else{\n $order_by .= \" `name` \";\n }\n if (isset($vars['sort'])) {\n $sort = \" {$vars['sort']}\";\n }else{\n $sort = \" ASC\";\n }\n }\n $cat = Db::result(\"SELECT * FROM `cat` {$where} {$order_by} {$sort}\");\n //print_r($cat);\n $drop = \"\";\n\n return $drop;\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public function update()\n {\n $project = $this->getProject();\n\n $values = $this->request->getValues();\n list($valid, $errors) = $this->swimlaneValidator->validateModification($values);\n\n if ($valid) {\n if ($this->swimlaneModel->update($values['id'], $values)) {\n $this->flash->success(t('Swimlane updated successfully.'));\n return $this->response->redirect($this->helper->url->to('SwimlaneController', 'index', array('project_id' => $project['id'])));\n } else {\n $errors = array('name' => array(t('Another swimlane with the same name exists in the project')));\n }\n }\n\n return $this->edit($values, $errors);\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-639", "cwe_name": "Authorization Bypass Through User-Controlled Key", "description": "The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.", "url": "https://cwe.mitre.org/data/definitions/639.html", "label_name": "vulnerable"} {"code": " function __autoload($classname)\n {\n PHPMailerAutoload($classname);\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "safe"} {"code": " public function toolbar() {\n// global $user;\n\n $menu = array();\n\t\t$dirs = array(\n\t\t\tBASE.'framework/modules/administration/menus',\n\t\t\tBASE.'themes/'.DISPLAY_THEME.'/modules/administration/menus'\n\t\t);\n\n\t\tforeach ($dirs as $dir) {\n\t\t if (is_readable($dir)) {\n\t\t\t $dh = opendir($dir);\n\t\t\t while (($file = readdir($dh)) !== false) {\n\t\t\t\t if (substr($file,-4,4) == '.php' && is_readable($dir.'/'.$file) && is_file($dir.'/'.$file)) {\n\t\t\t\t\t $menu[substr($file,0,-4)] = include($dir.'/'.$file);\n if (empty($menu[substr($file,0,-4)])) unset($menu[substr($file,0,-4)]);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t}\n\n // sort the top level menus alphabetically by filename\n\t\tksort($menu);\t\t\n\t\t$sorted = array();\n\t\tforeach($menu as $m) $sorted[] = $m;\n \n // slingbar position\n if (isset($_COOKIE['slingbar-top'])){\n $top = $_COOKIE['slingbar-top'];\n } else {\n $top = SLINGBAR_TOP;\n }\n \n\t\tassign_to_template(array(\n 'menu'=>(bs3()) ? $sorted : json_encode($sorted),\n \"top\"=>$top\n ));\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " function __construct () {\r\n\r\n }\r", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "vulnerable"} {"code": " public function urlProvider()\n {\n return array(\n array('http://till:test@svn.example.org/', $this->getCmd(\" --username 'till' --password 'test' \")),\n array('http://svn.apache.org/', ''),\n array('svn://johndoe@example.org', $this->getCmd(\" --username 'johndoe' --password '' \")),\n );\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-77", "cwe_name": "Improper Neutralization of Special Elements used in a Command ('Command Injection')", "description": "The software constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/77.html", "label_name": "vulnerable"} {"code": "function test($g) {\n $GLOBALS['g'] = $GLOBALS;\n\n array_replace_recursive($GLOBALS, $g);\n\n $GLOBALS['g'] = $GLOBALS;\n array_merge_recursive($GLOBALS, $g);\n}", "label": 1, "programming_language": "PHP", "cwe_id": "NVD-CWE-Other", "cwe_name": "Other", "description": "NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.", "url": "https://nvd.nist.gov/vuln/categories", "label_name": "safe"} {"code": " public function settings_save() {\n AuthUser::load();\n if (!AuthUser::isLoggedIn()) {\n redirect(get_url('login'));\n } else if (!AuthUser::hasPermission('admin_edit')) {\n Flash::set('error', __('You do not have permission to access the requested page!'));\n redirect(get_url());\n }\n \n if (!isset($_POST['settings'])) {\n Flash::set('error', 'File Manager - ' . __('form was not posted.'));\n redirect(get_url('plugin/file_manager/settings'));\n } else {\n $settings = $_POST['settings'];\n\n if ($settings['umask'] == 0)\n $settings['umask'] = 0;\n elseif (!preg_match('/^0?[0-7]{3}$/', $settings['umask']))\n $settings['umask'] = 0;\n if (strlen($settings['umask']) === 3)\n $settings['umask'] = '0' . $settings['umask'];\n elseif (strlen($settings['umask']) !== 4 && $settings['umask'] != 0)\n $settings['umask'] = 0;\n\n if (!preg_match('/^0?[0-7]{3}$/', $settings['dirmode']))\n $settings['dirmode'] = '0755';\n if (strlen($settings['dirmode']) === 3)\n $settings['dirmode'] = '0' . $settings['dirmode'];\n\n if (!preg_match('/^0?[0-7]{3}$/', $settings['filemode']))\n $settings['filemode'] = '0755';\n if (strlen($settings['filemode']) === 3)\n $settings['filemode'] = '0' . $settings['filemode'];\n }\n\n if (Plugin::setAllSettings($settings, 'file_manager'))\n Flash::setNow('success', 'File Manager - ' . __('plugin settings saved.'));\n else\n Flash::setNow('error', 'File Manager - ' . __('plugin settings not saved!'));\n\n $this->display('file_manager/views/settings', array('settings' => $settings));\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-20", "cwe_name": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "url": "https://cwe.mitre.org/data/definitions/20.html", "label_name": "vulnerable"} {"code": " protected function assertNoErrors () {\n\t\t$this->assertElementNotPresent('css=.xdebug-error');\n\t\t$this->assertElementNotPresent('css=#x2-php-error');\n $this->storeEval (\n \"window.document.body.attributes['x2-js-error'] ? 'true' : 'false'\", \n 'hasJsErrorAttr');\n $hasJsErrorAttr = $this->getExpression ('${hasJsErrorAttr}');\n if ($hasJsErrorAttr === 'true') {\n $this->storeAttribute ('dom=document.body@x2-js-error', 'errorMessage');\n $errorMessage = $this->getExpression ('${errorMessage}');\n println ($errorMessage);\n $this->assertTrue (false, $errorMessage);\n } \n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-20", "cwe_name": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "url": "https://cwe.mitre.org/data/definitions/20.html", "label_name": "safe"} {"code": " private function elementInScope($el, $table = false) {\n if(is_array($el)) {\n foreach($el as $element) {\n if($this->elementInScope($element, $table)) {\n return true;\n }\n }\n\n return false;\n }\n\n $leng = count($this->stack);\n\n for($n = 0; $n < $leng; $n++) {\n /* 1. Initialise node to be the current node (the bottommost node of\n the stack). */\n $node = $this->stack[$leng - 1 - $n];\n\n if($node->tagName === $el) {\n /* 2. If node is the target node, terminate in a match state. */\n return true;\n\n } elseif($node->tagName === 'table') {\n /* 3. Otherwise, if node is a table element, terminate in a failure\n state. */\n return false;\n\n } elseif($table === true && in_array($node->tagName, array('caption', 'td',\n 'th', 'button', 'marquee', 'object'))) {\n /* 4. Otherwise, if the algorithm is the \"has an element in scope\"\n variant (rather than the \"has an element in table scope\" variant),\n and node is one of the following, terminate in a failure state. */\n return false;\n\n } elseif($node === $node->ownerDocument->documentElement) {\n /* 5. Otherwise, if node is an html element (root element), terminate\n in a failure state. (This can only happen if the node is the topmost\n node of the stack of open elements, and prevents the next step from\n being invoked if there are no more elements in the stack.) */\n return false;\n }\n\n /* Otherwise, set node to the previous entry in the stack of open\n elements and return to step 2. (This will never fail, since the loop\n will always terminate in the previous step if the top of the stack\n is reached.) */\n }\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "safe"} {"code": " $banner->increaseImpressions();\n }\n }\n\n // assign banner to the template and show it!\n assign_to_template(array(\n 'banners'=>$banners\n ));\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public function getDoNotEmailLinkText(){\n if(!empty($this->doNotEmailLinkText)){\n return $this->doNotEmailLinkText;\n }\n return self::getDoNotEmailLinkDefaultText ();\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-20", "cwe_name": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "url": "https://cwe.mitre.org/data/definitions/20.html", "label_name": "safe"} {"code": " protected function defaultExtensions()\n {\n return [\n 'jpg',\n 'jpeg',\n 'bmp',\n 'png',\n 'webp',\n 'gif',\n 'svg',\n 'js',\n 'map',\n 'ico',\n 'css',\n 'less',\n 'scss',\n 'ics',\n 'odt',\n 'doc',\n 'docx',\n 'ppt',\n 'pptx',\n 'pdf',\n 'swf',\n 'txt',\n 'xml',\n 'ods',\n 'xls',\n 'xlsx',\n 'eot',\n 'woff',\n 'woff2',\n 'ttf',\n 'flv',\n 'wmv',\n 'mp3',\n 'ogg',\n 'wav',\n 'avi',\n 'mov',\n 'mp4',\n 'mpeg',\n 'webm',\n 'mkv',\n 'rar',\n 'xml',\n 'zip'\n ];\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "vulnerable"} {"code": " public static function fixName($name) {\n $name = preg_replace('/[^A-Za-z0-9\\.]/','_',$name);\n if ($name[0] == '.') // attempt to upload a dot file\n $name[0] = '_';\n $name = str_replace('_', '..', $name); // attempt to upload with redirection to new folder\n return $name;\n// return preg_replace('/[^A-Za-z0-9\\.]/', '-', $name);\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " foreach($course_RET as $period_day)\n {\n $period_days_append_sql .=\"(sp.start_time<='$period_day[END_TIME]' AND '$period_day[START_TIME]'<=sp.end_time AND DAYS LIKE '%$period_day[DAYS]%') OR \";\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "vulnerable"} {"code": " static function isSearchable() {\r\n return true;\r\n }\r", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-74", "cwe_name": "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')", "description": "The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/74.html", "label_name": "vulnerable"} {"code": " $this->stream = new Stream($streamOrFile);\n } elseif ($streamOrFile instanceof StreamInterface) {\n $this->stream = $streamOrFile;\n } else {\n throw new InvalidArgumentException(\n 'Invalid stream or file provided for UploadedFile'\n );\n }\n }", "label": 1, "programming_language": "PHP", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": " public function setAuthorizedBackendSession()\n {\n $_SESSION['authorized'] = true;\n $_SESSION['lastSessionId'] = time();\n $_SESSION['tstamp'] = time();\n $_SESSION['expires'] = time() + $this->expireTimeInMinutes * 60;\n $_SESSION['isBackendSession'] = true;\n // Renew the session id to avoid session fixation\n $this->renewSession();\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-613", "cwe_name": "Insufficient Session Expiration", "description": "According to WASC, \"Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.\"", "url": "https://cwe.mitre.org/data/definitions/613.html", "label_name": "vulnerable"} {"code": " public function duplicateTeam(Team $team, Request $request)\n {\n $newTeam = clone $team;\n $newTeam->setName($team->getName() . ' [COPY]');\n\n try {\n $this->repository->saveTeam($newTeam);\n $this->flashSuccess('action.update.success');\n\n return $this->redirectToRoute('admin_team_edit', ['id' => $newTeam->getId()]);\n } catch (\\Exception $ex) {\n $this->flashUpdateException($ex);\n }\n\n return $this->redirectToRoute('admin_team');\n }", "label": 0, "programming_language": "PHP", "cwe_id": "CWE-352", "cwe_name": "Cross-Site Request Forgery (CSRF)", "description": "The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.", "url": "https://cwe.mitre.org/data/definitions/352.html", "label_name": "vulnerable"} {"code": " public static function parseAndTrimImport($str, $isHTML = false) { //\ufffdDeath from above\ufffd? \ufffd\n //echo \"1cdef=\n\t\t
' + quote + '');\n }", "label": 0, "programming_language": "JavaScript", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "vulnerable"} {"code": " Modal.prototype.enforceFocus = function () {\n $(document)\n .off('focusin.bs.modal') // guard against infinite focus loop\n .on('focusin.bs.modal', $.proxy(function (e) {\n if (document !== e.target &&\n this.$element[0] !== e.target &&\n !this.$element.has(e.target).length) {\n this.$element.trigger('focus')\n }\n }, this))\n }", "label": 1, "programming_language": "JavaScript", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": "function _c(a,b,c) {var d={mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"};return a+\" \"+cd(d[c],a)}function ad(a) {switch(bd(a)) {case 1:case 3:case 4:case 5:case 9:return a+\" bloaz\";default:return a+\" vloaz\"}}function bd(a) {return a>9?bd(a%10):a}function cd(a,b) {return 2===b?dd(a):a}function dd(a) {var b={m:\"v\",b:\"v\",d:\"z\"};return void 0===b[a.charAt(0)]?a:b[a.charAt(0)]+a.substring(1)}", "label": 1, "programming_language": "JavaScript", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": "function addToolTipToTableCell(value) {\n if (value) {\n return `${value}`\n }\n return ''\n}", "label": 0, "programming_language": "JavaScript", "cwe_id": "CWE-1236", "cwe_name": "Improper Neutralization of Formula Elements in a CSV File", "description": "The software saves user-provided information into a Comma-Separated Value (CSV) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by spreadsheet software.", "url": "https://cwe.mitre.org/data/definitions/1236.html", "label_name": "vulnerable"} {"code": "function ElementAttributes(source){\n\t\n}", "label": 0, "programming_language": "JavaScript", "cwe_id": "CWE-436", "cwe_name": "Interpretation Conflict", "description": "Product A handles inputs or steps differently than Product B, which causes A to perform incorrect actions based on its perception of B's state.", "url": "https://cwe.mitre.org/data/definitions/436.html", "label_name": "vulnerable"} {"code": "var F=this.editorUi,G=F.editor.graph;if(G.isEnabled()&&\"1\"==urlParams.sketch){var N=this.createOption(mxResources.get(\"sketch\"),function(){return Editor.sketchMode},function(J,E){F.setSketchMode(!Editor.sketchMode);null!=E&&mxEvent.isShiftDown(E)||G.updateCellStyles({sketch:J?\"1\":null},G.getVerticesAndEdges())},{install:function(J){this.listener=function(){J(Editor.sketchMode)};F.addListener(\"sketchModeChanged\",this.listener)},destroy:function(){F.removeListener(this.listener)}});B.appendChild(N)}return B};", "label": 0, "programming_language": "JavaScript", "cwe_id": "CWE-20", "cwe_name": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "url": "https://cwe.mitre.org/data/definitions/20.html", "label_name": "vulnerable"} {"code": "Na.prototype.defaultWidth=4;Na.prototype.isOpenEnded=function(){return!0};Na.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,\"width\",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Na.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape(\"link\",Na);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,\n\"startWidth\",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,\"endWidth\",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,\"width\",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape(\"flexArrow\",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,", "label": 0, "programming_language": "JavaScript", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "vulnerable"} {"code": " PMA_ajaxShowMessage($('',{'class':'error','html':PMA_messages.strRequestFailed+' ( '+escapeHtml(AJAX.xhr.statusText)+' )'}));\n AJAX.active = false;\n AJAX.xhr = null;\n }\n }\n });", "label": 1, "programming_language": "JavaScript", "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "url": "https://cwe.mitre.org/data/definitions/79.html", "label_name": "safe"} {"code": "/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';function m(a) {throw a;}var q=void 0,u,aa=this;function v(a,b) {var c=a.split(\".\"),d=aa;!(c[0]in d)&&d.execScript&&d.execScript(\"var \"+c[0]);for(var f;c.length&&(f=c.shift());)!c.length&&b!==q?d[f]=b:d=d[f]?d[f]:d[f]={}};var w=\"undefined\"!==typeof Uint8Array&&\"undefined\"!==typeof Uint16Array&&\"undefined\"!==typeof Uint32Array&&\"undefined\"!==typeof DataView;new (w?Uint8Array:Array)(256);var x;for(x=0;256>x;++x)for(var y=x,ba=7,y=y>>>1;y;y>>>=1)--ba;var z=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,", "label": 1, "programming_language": "JavaScript", "cwe_id": "CWE-89", "cwe_name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.", "url": "https://cwe.mitre.org/data/definitions/89.html", "label_name": "safe"} {"code": "\"1\"==urlParams.embed&&(d.actions.get(\"save\").funct=function(n){u.isEditing()&&u.stopEditing();var y=\"0\"!=urlParams.pages||null!=d.pages&&1