Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
SoLetsDev committed Jun 1, 2023
1 parent 9581a7b commit f5ca0e8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/src/routes/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ router.get('/', passport.authenticate('jwt', {session: false}),isValidBackendTok


async function getConfig(req, res) {
const disallowedConfigKeys = ['secret', 'key', 'pwd', 'password'];
const accessToken = getAccessToken(req);
if (!accessToken) {
return res.status(HttpStatus.UNAUTHORIZED).json({
Expand All @@ -22,8 +21,7 @@ async function getConfig(req, res) {
const configName = req.query.configName;
log.silly(`query param for config is ${configName}`);
if (configName) {
const isBadConfigName = (element) => configName.includes(element);
if (disallowedConfigKeys.some(isBadConfigName)) {
if (configName !== 'scheduler:numDaysAllowedInDraftStatus') {
return res.status(HttpStatus.BAD_REQUEST).json();
}
const resJson = {
Expand Down

0 comments on commit f5ca0e8

Please sign in to comment.