Skip to content

Commit

Permalink
Merge pull request #2144 from opengovsg/release-v5.13.1
Browse files Browse the repository at this point in the history
chore: merge v5.13.1 into develop
  • Loading branch information
karrui authored Jun 11, 2021
2 parents 498e4b0 + 7c87bf3 commit d75142c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
14 changes: 8 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ 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).

#### [v5.13.1](https://github.com/opengovsg/FormSG/compare/v5.13.0...v5.13.1)

- feat(verification): up expiry time to 30min [`34b28c8`](https://github.com/opengovsg/FormSG/commit/34b28c87c14e8e0b55276e5a21b6f5473c436e24)

#### [v5.13.0](https://github.com/opengovsg/FormSG/compare/v5.12.1...v5.13.0)

> 8 June 2021
- fix: use correct argument key when counting form submissions [`#2101`](https://github.com/opengovsg/FormSG/pull/2101)
- chore(adminsubmissionsservice): renamed form to submissions to reflect context [`#2098`](https://github.com/opengovsg/FormSG/pull/2098)
- feat: enable retries for webhooks [`#2093`](https://github.com/opengovsg/FormSG/pull/2093)
Expand Down Expand Up @@ -38,6 +44,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): update mongoose to 5.12.12, update model types [`#2046`](https://github.com/opengovsg/FormSG/pull/2046)
- chore(deps-dev): bump type-fest from 0.20.2 to 1.2.0 [`#2049`](https://github.com/opengovsg/FormSG/pull/2049)
- test(betas): provide coverage [`23f9a9f`](https://github.com/opengovsg/FormSG/commit/23f9a9fe9675eab1d25c1983a08a7c76e0139d52)
- chore: bump version to v5.13.0 [`4516bbc`](https://github.com/opengovsg/FormSG/commit/4516bbcaf2ef2d99830cb5abb0ee26e2d53b31c2)

#### [v5.12.1](https://github.com/opengovsg/FormSG/compare/v5.12.0...v5.12.1)

Expand Down Expand Up @@ -88,7 +95,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(verification): loosen OTP waiting time by 2 seconds [`#1957`](https://github.com/opengovsg/FormSG/pull/1957)
- chore: bump version to 5.12.0 [`85759bc`](https://github.com/opengovsg/FormSG/commit/85759bc9dc01f73da3cbd0ec73c636e58e983948)

#### [v5.11.0](https://github.com/opengovsg/FormSG/compare/v5.10.1...v5.11.0)
#### [v5.11.0](https://github.com/opengovsg/FormSG/compare/v5.10.0...v5.11.0)

> 25 May 2021
Expand Down Expand Up @@ -156,11 +163,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore(deps-dev): bump @typescript-eslint/eslint-plugin [`#1868`](https://github.com/opengovsg/FormSG/pull/1868)
- fix(deps): bump @sentry/integrations from 6.3.5 to 6.3.6 [`#1850`](https://github.com/opengovsg/FormSG/pull/1850)
- chore: bump version to 5.11.0 [`54b1958`](https://github.com/opengovsg/FormSG/commit/54b1958d0968e670ef145461d9d7859384d573ef)

#### [v5.10.1](https://github.com/opengovsg/FormSG/compare/v5.10.0...v5.10.1)

> 17 May 2021
- chore: bump version to v5.10.1 [`0442cd7`](https://github.com/opengovsg/FormSG/commit/0442cd72637019fb1e43bce5f8f5abe14ee79f8c)
- fix: allow for unknown keys in updateEndPage validator [`617d86a`](https://github.com/opengovsg/FormSG/commit/617d86a28910eec6ebd3249a2de636086429d6a6)

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FormSG",
"description": "Form Manager for Government",
"version": "5.13.0",
"version": "5.13.1",
"homepage": "https://form.gov.sg",
"authors": [
"FormSG <[email protected]>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ describe('Verification service', () => {
signedData: MOCK_SIGNED_DATA,
hashRetries: 0,
hashedOtp: MOCK_HASHED_OTP,
// hash created 15min ago
hashCreatedAt: subMinutes(new Date(), 15),
// hash created 60min ago
hashCreatedAt: subMinutes(new Date(), 60),
})
const expiredOtpTransaction = await VerificationModel.create({
formId: mockFormId,
Expand Down
3 changes: 2 additions & 1 deletion src/app/services/mail/__tests__/mail.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
SendAutoReplyEmailsArgs,
} from 'src/app/services/mail/mail.types'
import * as MailUtils from 'src/app/services/mail/mail.utils'
import { HASH_EXPIRE_AFTER_SECONDS } from 'src/shared/util/verification'
import { BounceType, IPopulatedForm, ISubmissionSchema } from 'src/types'

const MOCK_VALID_EMAIL = '[email protected]'
Expand Down Expand Up @@ -78,7 +79,7 @@ describe('mail.service', () => {
html: MailUtils.generateVerificationOtpHtml({
appName: MOCK_APP_NAME,
otp: MOCK_OTP,
minutesToExpiry: 10,
minutesToExpiry: HASH_EXPIRE_AFTER_SECONDS / 60,
}),
headers: {
// Hardcode in tests in case something changes this.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<div class="row col-xs-12 top-1x">
{{ (vm.field.fieldType === 'mobile' ? 'A text message' : 'An email') +
' with a verification code was just sent to you. The code will be
valid for 10 minutes.' }}
valid for 30 minutes.' }}
</div>
<div class="row">
<div class="col-sm-8 col-xs-12 top-2x">
Expand Down
2 changes: 1 addition & 1 deletion src/shared/util/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BasicField } from '../../types'
export const VERIFIED_FIELDTYPES = [BasicField.Email, BasicField.Mobile]
export const SALT_ROUNDS = 10
export const TRANSACTION_EXPIRE_AFTER_SECONDS = 14400 // 4 hours
export const HASH_EXPIRE_AFTER_SECONDS = 600 // 10 minutes
export const HASH_EXPIRE_AFTER_SECONDS = 60 * 30 // 30 minutes
export const WAIT_FOR_OTP_SECONDS = 30
/**
* WAIT_FOR_OTP_SECONDS tolerance. Server allows OTPs to be requested every
Expand Down

0 comments on commit d75142c

Please sign in to comment.