diff --git a/CHANGELOG.md b/CHANGELOG.md index cc71746b07..48164854ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -#### [v6.173.0](https://github.com/opengovsg/FormSG/compare/v6.173.0...v6.173.0) +#### [v6.173.1](https://github.com/opengovsg/FormSG/compare/v6.174.0...v6.173.1) +- fix: remove multer [`#8041`](https://github.com/opengovsg/FormSG/pull/8041) + +#### [v6.174.0](https://github.com/opengovsg/FormSG/compare/v6.173.0...v6.174.0) + +> 13 January 2025 + +- fix: only show fixed translations for supported forms [`#8038`](https://github.com/opengovsg/FormSG/pull/8038) +- feat(iframe): add frame messaging for paysg [`#7979`](https://github.com/opengovsg/FormSG/pull/7979) +- chore: mongoose, nanoid packages update [`#8000`](https://github.com/opengovsg/FormSG/pull/8000) +- build: merge release v6.173.0 to develop [`#8034`](https://github.com/opengovsg/FormSG/pull/8034) +- fix(deps): bump libphonenumber-js from 1.11.16 to 1.11.17 in /shared [`#8021`](https://github.com/opengovsg/FormSG/pull/8021) +- * fix(deps): bump fp-ts from 2.16.8 to 2.16.9 (#8017) [`#8027`](https://github.com/opengovsg/FormSG/pull/8027) - fix: update mongodb binary version to 6 [`#8032`](https://github.com/opengovsg/FormSG/pull/8032) +- chore: bump version to v6.173.0 [`54e544d`](https://github.com/opengovsg/FormSG/commit/54e544d9835af07fbcd2b0218ed522c26b18fa5e) +- chore: bump version to v6.174.0 [`22b1122`](https://github.com/opengovsg/FormSG/commit/22b1122e8e15dbb8ca4c69c1d6c026a865d3b67c) #### [v6.173.0](https://github.com/opengovsg/FormSG/compare/v6.172.0...v6.173.0) @@ -39,7 +53,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build: release v6.170.0 [`#7998`](https://github.com/opengovsg/FormSG/pull/7998) - chore: bump version to v6.171.0 [`089a155`](https://github.com/opengovsg/FormSG/commit/089a155a51691f98f7c06ff218da3a263d22086c) -#### [v6.170.0](https://github.com/opengovsg/FormSG/compare/v6.169.1...v6.170.0) +#### [v6.170.0](https://github.com/opengovsg/FormSG/compare/v6.169.0...v6.170.0) > 16 December 2024 @@ -51,14 +65,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - build: merge release 6.169.0 to develop [`#7987`](https://github.com/opengovsg/FormSG/pull/7987) - fix(i18n): replace title,desc missed earlier [`#7940`](https://github.com/opengovsg/FormSG/pull/7940) - feat(i18n): replace hardcoded text in FeedbackBlock for i18n [`#7941`](https://github.com/opengovsg/FormSG/pull/7941) -- chore: bump version to v6.170.0 [`91bdef3`](https://github.com/opengovsg/FormSG/commit/91bdef34cd54b347c6ea9a1526b8811e8a6d2c1c) - -#### [v6.169.1](https://github.com/opengovsg/FormSG/compare/v6.169.0...v6.169.1) - -> 13 December 2024 - -- feat: add formurl to otp email [`#7993`](https://github.com/opengovsg/FormSG/pull/7993) - build: release v6.169.0 [`#7986`](https://github.com/opengovsg/FormSG/pull/7986) +- chore: bump version to v6.170.0 [`91bdef3`](https://github.com/opengovsg/FormSG/commit/91bdef34cd54b347c6ea9a1526b8811e8a6d2c1c) #### [v6.169.0](https://github.com/opengovsg/FormSG/compare/v6.168.0...v6.169.0) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index caa05e3155..3ec37104f0 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "form-frontend", - "version": "6.173.0", + "version": "6.173.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "form-frontend", - "version": "6.173.0", + "version": "6.173.1", "hasInstallScript": true, "dependencies": { "@chakra-ui/react": "^2.8.2", diff --git a/frontend/package.json b/frontend/package.json index abfb41ba65..b5ce3abe8b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "form-frontend", - "version": "6.173.0", + "version": "6.173.1", "homepage": ".", "type": "module", "private": true, diff --git a/frontend/src/features/admin-form/settings/SettingsService.ts b/frontend/src/features/admin-form/settings/SettingsService.ts index dbb10843b7..5e2e1a8f77 100644 --- a/frontend/src/features/admin-form/settings/SettingsService.ts +++ b/frontend/src/features/admin-form/settings/SettingsService.ts @@ -222,7 +222,7 @@ const updateFormSettings = async ( // TODO: update this to work with backend export const updateFormWhitelistSetting: UpdateStorageFormWhitelistSettingFn = async (formId: string, whitelistCsvString: Promise | null) => { - return ApiService.putForm( + return ApiService.put( `${ADMIN_FORM_ENDPOINT}/${formId}/settings/whitelist`, { whitelistCsvString: await whitelistCsvString, diff --git a/package-lock.json b/package-lock.json index 2279113ce9..fcbdfec0f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "FormSG", - "version": "6.173.0", + "version": "6.173.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "FormSG", - "version": "6.173.0", + "version": "6.173.1", "hasInstallScript": true, "dependencies": { "@aws-sdk/client-cloudwatch-logs": "^3.536.0", diff --git a/package.json b/package.json index c496ec2fff..3e5f3a06c5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FormSG", "description": "Form Manager for Government", - "version": "6.173.0", + "version": "6.173.1", "homepage": "https://form.gov.sg", "authors": [ "FormSG " diff --git a/src/app/modules/form/admin-form/admin-form.controller.ts b/src/app/modules/form/admin-form/admin-form.controller.ts index 8f8473bb6a..946a86b7cc 100644 --- a/src/app/modules/form/admin-form/admin-form.controller.ts +++ b/src/app/modules/form/admin-form/admin-form.controller.ts @@ -5,7 +5,6 @@ import { celebrate, Joi as BaseJoi, Segments } from 'celebrate' import { AuthedSessionData } from 'express-session' import { StatusCodes } from 'http-status-codes' import JSONStream from 'JSONStream' -import multer from 'multer' import { ResultAsync } from 'neverthrow' import { @@ -1657,29 +1656,24 @@ export const handleDeleteWorkflowStep: ControllerHandler< } const TWENTY_MB_IN_BYTES = 20 * 1024 * 1024 -const handleWhitelistSettingMultipartBody = multer({ - limits: { - fieldSize: TWENTY_MB_IN_BYTES, - fields: 1, // only allow csv string field - files: 0, - }, -}) - const _handleUpdateWhitelistSettingValidator = celebrate({ - [Segments.PARAMS]: { + [Segments.PARAMS]: Joi.object({ formId: Joi.string() .required() .pattern(/^[a-fA-F0-9]{24}$/) .message('Your form ID is invalid.'), - }, - [Segments.BODY]: { + }), + [Segments.BODY]: Joi.object({ whitelistCsvString: Joi.string() + .allow(null) // for removal of whitelist + .max(TWENTY_MB_IN_BYTES) .pattern(/^[a-zA-Z0-9,\r\n]+$/) .messages({ 'string.empty': 'Your csv is empty.', 'string.pattern.base': 'Your csv has one or more invalid characters.', + 'string.max': 'Your csv is too large.', }), - }, + }), }) const _parseWhitelistCsvString = (whitelistCsvString: string | null) => { @@ -1792,7 +1786,6 @@ export const _handleUpdateWhitelistSettingForTest = _handleUpdateWhitelistSetting export const handleUpdateWhitelistSetting = [ - handleWhitelistSettingMultipartBody.none(), // expecting string field _handleUpdateWhitelistSettingValidator, _handleUpdateWhitelistSetting, ] as ControllerHandler[]