{"code": "function PMA_Process_formset(FormDisplay $form_display)\n{\n if (filter_input(INPUT_GET, 'mode') == 'revert') {\n // revert erroneous fields to their default values\n $form_display->fixErrors();\n PMA_generateHeader303();\n }\n\n if (!$form_display->process(false)) {\n // handle form view and failed POST\n $form_display->display(true, true);\n return;\n }\n\n // check for form errors\n if (!$form_display->hasErrors()) {\n PMA_generateHeader303();\n return;\n }\n\n // form has errors, show warning\n $separator = PMA_URL_getArgSeparator('html');\n $page = filter_input(INPUT_GET, 'page');\n $formset = filter_input(INPUT_GET, 'formset');\n $formset = $formset ? \"{$separator}formset=$formset\" : '';\n $formId = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);\n if ($formId === null && $page == 'servers') {\n // we've just added a new server, get its id\n $formId = $form_display->getConfigFile()->getServerCount();\n }\n $formId = $formId ? \"{$separator}id=$formId\" : '';\n ?>\n
'. $_SESSION['error_msg'] .'
\nYou 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_name": "CWE-352", "label": 0} {"code": " public function update(CurrencyFormRequest $request, TransactionCurrency $currency)\n {\n /** @var User $user */\n $user = auth()->user();\n $data = $request->getCurrencyData();\n\n if (false === $data['enabled'] && $this->repository->currencyInUse($currency)) {\n $data['enabled'] = true;\n }\n if (!$this->userRepository->hasRole($user, 'owner')) {\n\n $request->session()->flash('error', (string) trans('firefly.ask_site_owner', ['owner' => e(config('firefly.site_owner'))]));\n Log::channel('audit')->info('Tried to update (POST) currency without admin rights.', $data);\n\n return redirect(route('currencies.index'));\n\n }\n $currency = $this->repository->update($currency, $data);\n Log::channel('audit')->info('Updated (POST) currency.', $data);\n $request->session()->flash('success', (string) trans('firefly.updated_currency', ['name' => $currency->name]));\n app('preferences')->mark();\n\n if (1 === (int) $request->get('return_to_edit')) {\n\n $request->session()->put('currencies.edit.fromUpdate', true);\n\n return redirect(route('currencies.edit', [$currency->id]));\n\n }\n\n return redirect($this->getPreviousUri('currencies.edit.uri'));\n }", "label_name": "CWE-352", "label": 0} {"code": " public function addCC($address, $name = '')\n {\n return $this->addAnAddress('cc', $address, $name);\n }", "label_name": "CWE-352", "label": 0} {"code": " protected function _validateSecretKey()\n {\n if (is_array($this->_publicActions) && in_array($this->getRequest()->getActionName(), $this->_publicActions)) {\n return true;\n }\n\n if (!($secretKey = $this->getRequest()->getParam(Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME, null))\n || $secretKey != Mage::getSingleton('adminhtml/url')->getSecretKey()) {\n return false;\n }\n return true;\n }", "label_name": "CWE-352", "label": 0} {"code": " $values = [READ => __('Read'),\n CREATE => __('Create'),", "label_name": "CWE-352", "label": 0} {"code": " $ret = array_merge($ret, csrf_flattenpost2(1, $n, $v));\n }", "label_name": "CWE-352", "label": 0} {"code": " foreach ($data['alertred'] as $alert) {\n # code...\n echo \"' + error_message + '
\", s->name);\n /* Stop program */\n if (s->stop)\n StringBuffer_append(res->outputbuffer,\n \" | \", s->name);\n /* Restart program */\n if ((s->start && s->stop) || s->restart)\n StringBuffer_append(res->outputbuffer,\n \" | \", s->name);\n /* (un)monitor */\n StringBuffer_append(res->outputbuffer,\n \" |