Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
thedirtypanda committed Feb 21, 2022
2 parents 78b022f + 546ba82 commit 53b106c
Show file tree
Hide file tree
Showing 3 changed files with 1,453 additions and 561 deletions.
25 changes: 22 additions & 3 deletions application/core/plugins/Authwebserver/Authwebserver.php
Expand Up @@ -83,9 +83,9 @@ public function beforeLogin()
$this->setAuthPlugin(); // This plugin handles authentication, halt further execution of auth plugins
return;
}
if ($this->get('is_default', null, null, $this->settings['is_default']['default'])) {
throw new CHttpException(401, 'Wrong credentials for LimeSurvey administration.');
}
}
if (!empty($serverKey) && $this->get('is_default', null, null, $this->settings['is_default']['default'])) {
throw new CHttpException(401, 'Wrong credentials for LimeSurvey administration.');
}
}

Expand Down Expand Up @@ -142,4 +142,23 @@ public function newUserSession()
}
}
}

/**
* Modified getPluginSettings to check for invalid settings
*
* @param boolean $getValues
* @return array
*/
public function getPluginSettings($getValues = true)
{
$settings = parent::getPluginSettings($getValues);

if (!empty($settings['serverkey']) && !empty($settings['serverkey']['current'])) {
if(!isset($_SERVER[$settings['serverkey']['current']])) {
$settings['serverkey']['help'] = "<p class='alert alert-danger'>" . gT("The current server key is not set in current access. If you set this plugin as default you will not be able to log in again.") . "<p>";
}
}

return $settings;
}
}
19 changes: 10 additions & 9 deletions assets/packages/adminsidepanel/package.json
Expand Up @@ -19,6 +19,7 @@
"node-sass": "^4.0.0",
"vue": "^2.6.10",
"vue-jest": "^3.0.7",
"@babel/polyfill": "^7.4.4",
"vue-localstorage": "^0.5.0",
"vuex": "^2.3.1",
"vuex-persist": "^1.0.3"
Expand All @@ -29,28 +30,28 @@
"@babel/preset-env": "^7.16.0",
"@testing-library/vue": "^5.8.2",
"@vue/babel-preset-app": "^5.0.1",
"@vue/cli-plugin-babel": "^4.5.15",
"@vue/cli-plugin-eslint": "^4.5.15",
"@vue/cli-service": "^4.5.15",
"@vue/test-utils": "^1.2.2",
"@vue/vue2-jest": "^27.0.0-alpha.3",
"babel-eslint": "^10.0.1",
"babel-jest": "^27.3.1",
"core-js": "^3.21.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"jest": "^27.3.1",
"jsdom": "^18.1.1",
"jsdom-global": "^3.0.2",
"lodash": "^4.17.4",
"node-sass": "^7.0.1",
"rtlcss-webpack-plugin": "^4.0.3",
"sass-loader": "^10",
"vue": "^3.2.31",
"vue-localstorage": "^0.6.2",
"vue-template-compiler": "^2.5.21",
"vuex": "^4.0.2",
"vuex-persist": "^3.1.3"
"vuex-persist": "^3.1.3",
"@vue/cli-plugin-babel": "^3.6.0",
"@vue/cli-plugin-eslint": "^3.6.0",
"@vue/cli-service": "^3.6.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"rtlcss-webpack-plugin": "^4.0.3",
"sass-loader": "^7.1.0",
},
"eslintConfig": {
"root": true,
Expand Down

0 comments on commit 53b106c

Please sign in to comment.