Skip to content

Commit

Permalink
Hack to remove validation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpems committed Dec 20, 2024
1 parent a7466b6 commit 0cb43ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aws-lambdas/AppForm/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export const handler = async (event) => {
const formData = JSON.parse(event.body);

const refererError = RequestValidator.validateReferer(event.headers, process.env['ALLOWED_REFERER']);
if(!refererError) config = await configManager.loadConfig(FileType.Application);
const validationError = refererError === "" ? await RequestValidator.validateRequest(formData, FileType.Application, config.recaptchaV2VerifyUrl, config.recaptchaV2SecretKey) : 'Access forbidden';
if (validationError) {
return { statusCode: validationError === 'Access forbidden' ? 403 : 400, headers: HEADERS, body: validationError };
}
// if(!refererError) config = await configManager.loadConfig(FileType.Application);
// const validationError = refererError === "" ? await RequestValidator.validateRequest(formData, FileType.Application, config.recaptchaV2VerifyUrl, config.recaptchaV2SecretKey) : 'Access forbidden';
// if (validationError) {
// return { statusCode: validationError === 'Access forbidden' ? 403 : 400, headers: HEADERS, body: validationError };
// }

switch (formData.requestType) {
case RequestTypes.RequestThisAppToBeTested:
Expand Down

0 comments on commit 0cb43ac

Please sign in to comment.