code stringlengths 41 2.04k | label_name stringclasses 2
values | label int64 0 1 |
|---|---|---|
function PMA_Process_formset(FormDisplay $form_display)
{
if (filter_input(INPUT_GET, 'mode') == 'revert') {
// revert erroneous fields to their default values
$form_display->fixErrors();
PMA_generateHeader303();
}
if (!$form_display->process(false)) {
// handle form view an... | CWE-352 | 0 |
public static function insert ($vars) {
if(is_array($vars)){
$set = "";
$k = "";
foreach ($vars['key'] as $key => $val) {
$set .= "'$val',";
$k .= "`$key`,";
}
$set = substr($set, 0,-1);
$k =... | CWE-352 | 0 |
public static function go($input, $path, $allowed='', $uniq=false, $size='', $width = '', $height = ''){
$filename = Typo::cleanX($_FILES[$input]['name']);
$filename = str_replace(' ', '_', $filename);
if(isset($_FILES[$input]) && $_FILES[$input]['error'] == 0){
if($uniq == true)... | CWE-352 | 0 |
public function store(CurrencyFormRequest $request)
{
/** @var User $user */
$user = auth()->user();
$data = $request->getCurrencyData();
if (!$this->userRepository->hasRole($user, 'owner')) {
Log::error('User ' . auth()->user()->id . ' is not admin, but tried to sto... | CWE-352 | 0 |
public function enableCurrency(TransactionCurrency $currency)
{
app('preferences')->mark();
$this->repository->enable($currency);
session()->flash('success', (string) trans('firefly.currency_is_now_enabled', ['name' => $currency->name]));
Log::channel('audit')->info(sprintf('Ena... | CWE-352 | 0 |
public static function rss() {
switch (SMART_URL) {
case true:
# code...
$url = Options::get('siteurl')."/rss".GX_URL_PREFIX;
break;
default:
# code...
$url = Options::get('siteurl')."/index.... | CWE-352 | 0 |
public function pinCommentAction(ProjectComment $comment)
{
$comment->setPinned(!$comment->isPinned());
try {
$this->repository->saveComment($comment);
} catch (\Exception $ex) {
$this->flashUpdateException($ex);
}
return $this->redirectToRoute('p... | CWE-352 | 0 |
public static function page($vars) {
switch (SMART_URL) {
case true:
# code...
$url = Options::get('siteurl')."/".self::slug($vars).GX_URL_PREFIX;
break;
default:
# code...
$url = Options::ge... | CWE-352 | 0 |
public function submit(Request $request)
{
return logout();
} | CWE-352 | 0 |
public function write($template = '')
{
if (!empty($this->script_files)) {
$this->set_env('request_token', $this->app->get_request_token());
}
$commands = $this->get_js_commands($framed);
// if all js commands go to parent window we can ignore all
// script ... | CWE-352 | 0 |
$ret = array_merge($ret, csrf_flattenpost2($level+1, $nk, $v));
} | CWE-352 | 0 |
protected static function __Load($path) {
include_once($path);
} | CWE-352 | 0 |
public function testDeleteTemplateAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$fixture = new InvoiceTemplateFixtures();
$template = $this->importFixture($fixture);
$id = $template[0]->getId();
$this->request($client, '/invoice/template/'... | CWE-352 | 0 |
function update_license_status() {
$status = '';
$license_key = $this->get_license_key();
if (!empty($license_key) || defined('W3TC_LICENSE_CHECK')) {
$license = edd_w3edge_w3tc_check_license($license_key, W3TC_VERSION);
$version = '';
if ($license) {
... | CWE-352 | 0 |
public static function startup()
{
//Override the default expire time of token
\CsrfMagic\Csrf::$expires = 259200;
\CsrfMagic\Csrf::$callback = function ($tokens) {
throw new \App\Exceptions\AppException('Invalid request - Response For Illegal Access', 403);
};
$js = 'vendor/yetiforce/csrf-magic/src/Csrf... | CWE-352 | 0 |
public function testConfigurationCookieCreate()
{
$_SERVER['REQUEST_METHOD'] = 'GET';
$controller = $this->getMock('Cake\Controller\Controller', ['redirect']);
$controller->request = new Request(['webroot' => '/dir/']);
$controller->response = new Response();
$component... | CWE-352 | 0 |
public static function meta($cont_title='', $cont_desc='', $pre =''){
global $data;
//print_r($data);
//if(empty($data['posts'][0]->title)){
if(is_array($data) && isset($data['posts'][0]->title)){
$sitenamelength = strlen(Options::get('sitename'));
... | CWE-352 | 0 |
public function create(Request $request)
{
/** @var User $user */
$user = auth()->user();
if (!$this->userRepository->hasRole($user, 'owner')) {
$request->session()->flash('error', (string) trans('firefly.ask_site_owner', ['owner' => e(config('firefly.site_owner'))]));
... | CWE-352 | 0 |
function phpAds_SessionStart()
{
global $session;
if (empty($_COOKIE['sessionID'])) {
$session = array();
$_COOKIE['sessionID'] = md5(uniqid('phpads', 1));
phpAds_SessionSetAdminCookie('sessionID', $_COOKIE['sessionID']);
}
return $_COOKIE['sessionID'];
} | CWE-384 | 1 |
function handleFormSubmission(&$request, &$output, &$session) {
if ($request->getText('action')) {
handleRequestActionSubmission('admin', $this, $session);
} else if ($request->getText('blockSubmit')) {
$this->handleBlockFormSubmission($request, $output, $session);
} else if ($request->getText('unblockSubm... | CWE-352 | 0 |
private function _handleCallback(){
try {
// Try to get an access token using the authorization code grant.
$accessToken = $this->_provider->getAccessToken('authorization_code', [
'code' => $_GET['code']
]);
} catch (\League\OAuth2\Client\Provider\Exception\IdentityProviderException $e) {
// Fail... | CWE-352 | 0 |
public function setFrom($address, $name = '', $auto = true)
{
$address = trim($address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
if (!$this->validateAddress($address)) {
$this->setError($this->lang('invalid_address') . ': ' . $address);
... | CWE-352 | 0 |
function addChannelPageTools($agencyid, $websiteId, $channelid, $channelType)
{
if ($channelType == 'publisher') {
$deleteReturlUrl = MAX::constructUrl(MAX_URL_ADMIN, 'affiliate-channels.php');
}
else {
$deleteReturlUrl = MAX::constructUrl(MAX_URL_ADMIN, 'channel-index.php');
}
//du... | CWE-352 | 0 |
function storeSerializedSession($serialized_session_data, $session_id)
{
$doSession = OA_Dal::staticGetDO('session', $session_id);
if ($doSession) {
$doSession->sessiondata = $serialized_session_data;
$doSession->update();
}
else {
$doSession =... | CWE-384 | 1 |
public function __destruct()
{
if ($this->Mailer == 'smtp') { //close any open SMTP connection nicely
$this->smtpClose();
}
} | CWE-352 | 0 |
$otherPublisherName = MAX_buildName($aOtherPublisher['publisher_id'], $aOtherPublisher['name']);
if ($aOtherPublisher['publisher_id'] != $affiliateid) {
$form .= "<option value='" . $aOtherPublisher['publisher_id'] . "'>" . htmlspecialchars($otherPublisherName) . "</option>";
... | CWE-352 | 0 |
public static function httpMethodProvider()
{
return [
['PATCH'], ['PUT'], ['POST'], ['DELETE']
];
} | CWE-352 | 0 |
foreach ($all_users as &$u) {
if ($u['username'] == $username && $this->verifyPassword($password, $u['password'])) {
$user = $this->mapToUserObject($u);
$this->store($user);
$this->session->set(self::SESSION_HASH, $u['password']);
retu... | CWE-384 | 1 |
function getRights($interface = 'central') {
$values = [READ => __('Read'),
CREATE => __('Create'),
PURGE => _x('button', 'Delete permanently'),
self::CHECKUPDATE => __('Check for upgrade')];
re... | CWE-352 | 0 |
public function logout(){
$login_user = $this->checkLogin();
D("UserToken")->where(" uid = '$login_user[uid]' ")->save(array("token_expire"=>0));
session("login_user" , NULL);
cookie('cookie_token',NULL);
session(null);
$this->sendResult(array());
} | CWE-352 | 0 |
function yourls_verify_nonce( $action, $nonce = false, $user = false, $return = '' ) {
// get user
if( false == $user )
$user = defined( 'YOURLS_USER' ) ? YOURLS_USER : '-1';
// get current nonce value
if( false == $nonce && isset( $_REQUEST['nonce'] ) )
$nonce = $_REQUEST['nonce'];
// Allow plugins to short... | CWE-352 | 0 |
public static function sitemap() {
switch (SMART_URL) {
case true:
# code...
$url = Options::get('siteurl')."/sitemap".GX_URL_PREFIX;
break;
default:
# code...
$url = Options::get('siteurl').... | CWE-352 | 0 |
public function delete(Request $request, TransactionCurrency $currency)
{
/** @var User $user */
$user = auth()->user();
if (!$this->userRepository->hasRole($user, 'owner')) {
$request->session()->flash('error', (string) trans('firefly.ask_site_owner', ['owner' => e(config('... | CWE-352 | 0 |
public function testDuplicateAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
/** @var EntityManager $em */
$em = $this->getEntityManager();
$project = $em->find(Project::class, 1);
$project->setMetaField((new ProjectMeta())->setName('foo')->se... | CWE-352 | 0 |
foreach ($indexToDelete as $indexName) {
$this->addSql('DROP INDEX ' . $indexName . ' ON ' . $users);
} | CWE-352 | 0 |
public function __construct(){
} | CWE-352 | 0 |
public function save(){
$login_user = $this->checkLogin();
$uid = $login_user['uid'] ;
$id = I("id/d");
$member_group_id = I("member_group_id/d");
$cat_id = I("cat_id/d");
$teamItemMemberInfo = D("TeamItemMember")->where(" id = '$id' ")->find();
$item_id = ... | CWE-352 | 0 |
static public function onPost( $par, $out, $request ) {
global $wgUser;
if (!$request->getText('reason')) {
$out->addHTML(Html::rawElement(
'p',
[ 'class' => 'error '],
wfMessage( 'report-error-missing-reason' )->escaped()
));
} else {
$dbw = wfGetDB( DB_MASTER );
$dbw->startAtomic(__METH... | CWE-352 | 0 |
public function defaultCurrency(Request $request, TransactionCurrency $currency)
{
app('preferences')->set('currencyPreference', $currency->code);
app('preferences')->mark();
Log::channel('audit')->info(sprintf('Make %s the default currency.', $currency->code));
$this->reposito... | CWE-352 | 0 |
function render() {
$output = $this->pageContext->getOutput();
$output->enableOOUI();
$this->showAddBypassForm();
$this->showBypassesList();
}
| CWE-352 | 0 |
function phpAds_SessionDataFetch()
{
global $session;
$dal = new MAX_Dal_Admin_Session();
// Guard clause: Can't fetch a session without an ID
if (empty($_COOKIE['sessionID'])) {
return;
}
$serialized_session = $dal->getSerializedSession($_COOKIE['sessionID']);
// This is required be... | CWE-384 | 1 |
public function pwd(){
$item_id = I("item_id/d");
$password = I("password");
$v_code = I("v_code");
$refer_url = I('refer_url');
//检查用户输错密码的次数。如果超过一定次数,则需要验证 验证码
$key= 'item_pwd_fail_times_'.$item_id;
if(!D("VerifyCode")->_check_times($key,10)){
i... | CWE-352 | 0 |
$formatted = wfMessage( 'datadump-table-column-failed' )->text();
} else {
$formatted = wfMessage( 'datadump-table-column-queued' )->text();
}
break;
case 'dumps_size':
$formatted = htmlspecialchars(
$this->getLanguage()->formatSize( isset( $row->dumps_size ) ? $row->dumps_size : 0 ) )... | CWE-352 | 0 |
public function addReplyTo($address, $name = '')
{
return $this->addAnAddress('Reply-To', $address, $name);
} | CWE-352 | 0 |
public function addUser(){
$login_user = $this->checkLogin();
$this->checkAdmin();
$username = I("username");
$password = I("password");
$uid = I("uid");
$name = I("name");
if(!$username){
$this->sendError(10101,'用户名不允许为空');
return ;
... | CWE-352 | 0 |
function csrf_get_tokens()
{
$has_cookies = !empty($_COOKIE);
// $ip implements a composite key, which is sent if the user hasn't sent
// any cookies. It may or may not be used, depending on whether or not
// the cookies "stick"
$secret = csrf_get_secret();
if (!$has_cookies && $secret) {
... | CWE-352 | 0 |
public function attorn(){
$login_user = $this->checkLogin();
$username = I("username");
$item_id = I("item_id/d");
$password = I("password");
$item = D("Item")->where("item_id = '$item_id' ")->find();
if(!$this->checkItemManage($login_user['uid'] , $item['item_id'... | CWE-352 | 0 |
public static function error ($vars="") {
if( isset($vars) && $vars != "" ) {
include(GX_PATH.'/inc/lib/Control/Error/'.$vars.'.control.php');
}else{
include(GX_PATH.'/inc/lib/Control/Error/404.control.php');
}
} | CWE-352 | 0 |
function handleFormSubmission() {
$request = $request = $this->pageContext->getRequest();
$dbw = getTransactableDatabase('scratch-confirmaccount-bypasses');
foreach (self::requestVariableActionMapping as $fieldKey => $action) {
if ($request->getText($fieldKey)) {
... | CWE-352 | 0 |
public function password()
{
$user = Auth::user();
return view('account/change-password', compact('user'));
} | CWE-384 | 1 |
public static function get_param($key = NULL) {
$info = [
'stype' => htmlentities(self::$search_type),
'stext' => htmlentities(self::$search_text),
'method' => htmlentities(self::$search_method),
'datelimit' => self::$search_date_limit,
... | CWE-352 | 0 |
public function enable($id) {
$this->active($id, TRUE);
} | CWE-352 | 0 |
public function deleteCommentAction(ProjectComment $comment)
{
$projectId = $comment->getProject()->getId();
try {
$this->repository->deleteComment($comment);
} catch (\Exception $ex) {
$this->flashDeleteException($ex);
}
return $this->redirectTo... | CWE-352 | 0 |
public static function simple($input)
{
return empty($str) ? '' : pts_strings::keep_in_string($input, pts_strings::CHAR_LETTER | pts_strings::CHAR_NUMERIC | pts_strings::CHAR_DASH | pts_strings::CHAR_DECIMAL | pts_strings::CHAR_SPACE | pts_strings::CHAR_UNDERSCORE | pts_strings::CHAR_COMMA | pts_strings::CHAR_AT | ... | CWE-352 | 0 |
public function testSettingCookie()
{
$_SERVER['REQUEST_METHOD'] = 'GET';
$controller = $this->getMock('Cake\Controller\Controller', ['redirect']);
$controller->request = new Request(['webroot' => '/dir/']);
$controller->response = new Response();
$event = new Event('Co... | CWE-352 | 0 |
protected function edebug($str)
{
if (!$this->SMTPDebug) {
return;
}
switch ($this->Debugoutput) {
case 'error_log':
error_log($str);
break;
case 'html':
//Cleans up output a bit for a better looking disp... | CWE-352 | 0 |
public function pinCommentAction(CustomerComment $comment)
{
$comment->setPinned(!$comment->isPinned());
try {
$this->repository->saveComment($comment);
} catch (\Exception $ex) {
$this->flashUpdateException($ex);
}
return $this->redirectToRoute('... | CWE-352 | 0 |
public static function desc($vars){
if(!empty($vars)){
$desc = substr(strip_tags(htmlspecialchars_decode($vars).". ".Options::get('sitedesc')),0,150);
}else{
$desc = substr(Options::get('sitedesc'),0,150);
}
return $desc;
} | CWE-352 | 0 |
function logon($username, $password, &$sessionId)
{
global $_POST, $_COOKIE;
global $strUsernameOrPasswordWrong;
/**
* @todo Please check if the following statement is in correct place because
* it seems illogical that user can get session ID from internal login with
... | CWE-384 | 1 |
public static function cat($vars) {
switch (SMART_URL) {
case true:
# code...
$url = Options::get('siteurl')."/".$vars."/".Typo::slugify(Categories::name($vars));
break;
default:
# code...
$u... | CWE-352 | 0 |
public function testPinCommentAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->assertAccessIsGranted($client, '/admin/project/1/details');
$form = $client->getCrawler()->filter('form[name=project_comment_form]')->form();
$client->submit($form, [... | CWE-352 | 0 |
public function test_invite_set_password()
{
Notification::fake();
$user = $this->getViewer();
$inviteService = app(UserInviteService::class);
$inviteService->sendInvitation($user);
$token = DB::table('user_invites')->where('user_id', '=', $user->id)->first()->token;
... | CWE-352 | 0 |
function compression_test() {
?>
<script type="text/javascript">
var testCompression = {
get : function(test) {
var x;
if ( window.XMLHttpRequest ) {
x = new XMLHttpRequest();
} else {
try{x=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{x=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){};}
... | CWE-352 | 0 |
function display_error_block() {
if (!empty($_SESSION['error_msg'])) {
echo '
<div>
<script type="text/javascript">
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-message" ).dialog({
... | CWE-352 | 0 |
public function up(RuleGroup $ruleGroup)
{
$order = (int)$ruleGroup->order;
if ($order > 1) {
$newOrder = $order - 1;
$this->repository->setOrder($ruleGroup, $newOrder);
}
return redirect(route('rules.index'));
} | CWE-352 | 0 |
function csrf_check($fatal = true)
{
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
return true;
}
csrf_start();
$name = $GLOBALS['csrf']['input-name'];
$ok = false;
$tokens = '';
do {
if (!isset($_POST[$name])) {
break;
}
// we don't regenerate a to... | CWE-352 | 0 |
function verifyCSRFToken() {
$clean_referer = str_replace(array("http://","https://"),"//",$_SERVER["HTTP_REFERER"]);
$clean_domain = str_replace(array("http://","https://"),"//",DOMAIN);
$token = isset($_POST[$this->CSRFTokenField]) ? $_POST[$this->CSRFTokenField] : $_GET[$this->CSRFTokenField];
if (... | CWE-352 | 0 |
public function update(){
$login_user = $this->checkLogin();
$item_id = I("item_id/d");
$item_name = I("item_name");
$item_description = I("item_description");
$item_domain = I("item_domain");
$password = I("password");
$uid = $login_user['uid'] ;
... | CWE-352 | 0 |
function clean_input_value($value) {
if (is_string($value)) {
return descript($value);
}
if (is_array($value)) {
return array_map('descript', $value);
}
return '';
} | CWE-352 | 0 |
public function testDeleteCommentAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$this->assertAccessIsGranted($client, '/admin/customer/1/details');
$form = $client->getCrawler()->filter('form[name=customer_comment_form]')->form();
$client->submit($fo... | CWE-352 | 0 |
public function cloneGroup(TransactionGroup $group)
{
/** @var GroupCloneService $service */
$service = app(GroupCloneService::class);
$newGroup = $service->cloneGroup($group);
// event!
event(new StoredTransactionGroup($newGroup));
app('preferences')->mark();... | CWE-352 | 0 |
public function changePassword(){
$login_user = $this->checkLogin();
$this->checkAdmin();
$uid = I("uid/d");
$new_password = I("new_password");
$return = D("User")->updatePwd($uid, $new_password);
if (!$return) {
$this->sendError(10101);
}else{
... | CWE-352 | 0 |
public function save(){
$login_user = $this->checkLogin();
$team_name = I("team_name");
$id = I("id/d");
if ($id) {
D("Team")->where(" id = '$id' ")->save(array("team_name"=>$team_name));
}else{
$data['username'] = $login_user['username... | CWE-352 | 0 |
public function loadUserByUsername($username)
{
return $this->inner->loadUserByUsername($username);
} | CWE-384 | 1 |
public function delete(AvailableBudget $availableBudget)
{
$this->abRepository->destroyAvailableBudget($availableBudget);
session()->flash('success', trans('firefly.deleted_ab'));
return redirect(route('budgets.index'));
} | CWE-352 | 0 |
public static function isHadSub($parent, $menuid =''){
$sql = sprintf("SELECT * FROM `menus` WHERE `parent` = '%s' %s", $parent, $where);
} | CWE-352 | 0 |
public function confirm(string $token)
{
try {
$userId = $this->emailConfirmationService->checkTokenAndGetUserId($token);
} catch (UserTokenNotFoundException $exception) {
$this->showErrorNotification(trans('errors.email_confirmation_invalid'));
return redire... | CWE-352 | 0 |
public function down(RuleGroup $ruleGroup)
{
$maxOrder = $this->repository->maxOrder();
$order = (int)$ruleGroup->order;
if ($order < $maxOrder) {
$newOrder = $order + 1;
$this->repository->setOrder($ruleGroup, $newOrder);
}
return redirect(rou... | CWE-352 | 0 |
$logo = "<img src=\"".Options::get('siteurl').Options::get('logo')."\"
style=\"width: $width; height: $height; margin: 1px;\">";
}else{
$logo = "<span class=\"mg genixcms-logo\"></span>";
}
return $logo;
} | CWE-352 | 0 |
public function delete(){
$id = I("id/d")? I("id/d") : 0;
$login_user = $this->checkLogin();
if ($id && $login_user['uid']) {
$ret = D("Team")->where(" id = '$id' and uid = '$login_user[uid]'")->delete();
}
if ($ret) {
D("TeamItem")->where(" team_id = ... | CWE-352 | 0 |
public function init()
{
if(!e_QUERY)
{
e107::getPlug()->clearCache();
}
if($this->getMode()=== 'avail')
{
$this->listQry = "SELECT * FROM `#plugin` WHERE plugin_installflag = 0 AND plugin_category != 'menu' ";
}
// Set drop-down values (if any).
} | CWE-352 | 0 |
function ttMitigateCSRF() {
// No need to do anything for get requests.
global $request;
if ($request->isGet())
return true;
$origin = $_SERVER['HTTP_ORIGIN'];
if ($origin) {
$pos = strpos($origin, '//');
$origin = substr($origin, $pos+2); // Strip protocol.
}
if (!$origin) {
// Try using... | CWE-352 | 0 |
public function refreshUser(UserInterface $user)
{
$user = $this->inner->refreshUser($user);
$alterUser = \Closure::bind(function (InMemoryUser $user) { $user->password = 'foo'; }, null, class_exists(User::class) ? User::class : InMemoryUser::class);
$alterUser($user);
return $... | CWE-384 | 1 |
\CsrfMagic\Csrf::$callback = function ($tokens) {
throw new \App\Exceptions\AppException('Invalid request - Response For Illegal Access', 403);
}; | CWE-352 | 0 |
public static function simple($input)
{
return empty($str) ? '' : pts_strings::keep_in_string($input, pts_strings::CHAR_LETTER | pts_strings::CHAR_NUMERIC | pts_strings::CHAR_DASH | pts_strings::CHAR_DECIMAL | pts_strings::CHAR_SPACE | pts_strings::CHAR_UNDERSCORE | pts_strings::CHAR_COMMA | pts_strings::CHAR_AT | ... | CWE-352 | 0 |
public function deleteByName(){
$item_id = I("item_id/d");
$env_id = I("env_id/d");
$var_name = I("var_name");
$login_user = $this->checkLogin();
$uid = $login_user['uid'] ;
if(!$this->checkItemEdit($uid , $item_id)){
$this->sendError(10303);
... | CWE-352 | 0 |
public function test_create_nonce_url() {
$url = yourls_nonce_url( rand_str(), rand_str(), rand_str(), rand_str() );
$this->assertTrue( is_string($url) );
// $this->assertIsString($url);
} | CWE-352 | 0 |
public function AdminObserver()
{
if($this->getPosted('go_back'))
{
$this->redirect('list', 'main', true);
}
$userid = $this->getId();
$sql = e107::getDb();
$user = e107::getUser();
$sysuser = e107::getSystemUser($userid, false);
$admin_log = e107::getAdminLog();
$mes = e107::getMe... | CWE-352 | 0 |
public function handle(Request $request, Closure $next, int $keyType)
{
if (is_null($request->bearerToken()) && is_null($request->user())) {
throw new HttpException(401, null, null, ['WWW-Authenticate' => 'Bearer']);
}
// This is a request coming through using cookies, we ha... | CWE-352 | 0 |
public function __construct()
{
parent::__construct();
// for flash data
$this->load->library('session');
if (!$this->fuel->config('admin_enabled')) show_404();
$this->load->vars(array(
'js' => '',
'css' => css($this->fuel->config('xtra_css')), // use CSS function here because of the asset library... | CWE-352 | 0 |
public function notify_edge_mode() {
w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/ui.php');
w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/admin_ui.php');
$message = sprintf(__('<p>You can now keep W3 Total Cache up-to-date without having to worry about new features breaking your website. There wi... | CWE-352 | 0 |
public function update(CurrencyFormRequest $request, TransactionCurrency $currency)
{
/** @var User $user */
$user = auth()->user();
$data = $request->getCurrencyData();
if (false === $data['enabled'] && $this->repository->currencyInUse($currency)) {
$data['enabled']... | CWE-352 | 0 |
public function addCC($address, $name = '')
{
return $this->addAnAddress('cc', $address, $name);
} | CWE-352 | 0 |
protected function _validateSecretKey()
{
if (is_array($this->_publicActions) && in_array($this->getRequest()->getActionName(), $this->_publicActions)) {
return true;
}
if (!($secretKey = $this->getRequest()->getParam(Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME, null))
... | CWE-352 | 0 |
$values = [READ => __('Read'),
CREATE => __('Create'), | CWE-352 | 0 |
$ret = array_merge($ret, csrf_flattenpost2(1, $n, $v));
} | CWE-352 | 0 |
foreach ($data['alertred'] as $alert) {
# code...
echo "<li>$alert</li>\n";
} | CWE-352 | 0 |
public function deleteItem(){
$login_user = $this->checkLogin();
$this->checkAdmin();
$item_id = I("item_id/d");
$return = D("Item")->soft_delete_item($item_id);
if (!$return) {
$this->sendError(10101);
}else{
$this->sendResult($return);
... | CWE-352 | 0 |
function showAddBypassForm() {
$output = $this->pageContext->getOutput();
$request = $this->pageContext->getRequest();
$output->addHTML(
new OOUI\FormLayout([
'action' => SpecialPage::getTitleFor('ConfirmAccounts', wfMessage('scratch-confirmaccount-... | CWE-352 | 0 |
protected function addAnAddress($kind, $address, $name = '')
{
if (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) {
$this->setError($this->lang('Invalid recipient array') . ': ' . $kind);
$this->edebug($this->lang('Invalid recipient array') . ': ' . $kind);
if ($this... | CWE-352 | 0 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 90