From d0703aa37772759e8e28b5da7187e97e7aadc495 Mon Sep 17 00:00:00 2001 From: Jabster28 <29015942+Jabster28@users.noreply.github.com> Date: Tue, 11 May 2021 02:58:27 +0100 Subject: [PATCH] fix: switch PGP regex to span multiple lines (#1598) * fix: switch PGP regex to span multiple lines * also change the regex in this file --- src/components/Settings/Notifications/NotificationsEmail.tsx | 2 +- .../UserNotificationSettings/UserNotificationsEmail.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx index d7e454916..71a8e2305 100644 --- a/src/components/Settings/Notifications/NotificationsEmail.tsx +++ b/src/components/Settings/Notifications/NotificationsEmail.tsx @@ -108,7 +108,7 @@ const NotificationsEmail: React.FC = () => { otherwise: Yup.string().nullable(), }) .matches( - /^-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----$/, + /-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----/s, intl.formatMessage(messages.validationPgpPrivateKey) ), pgpPassword: Yup.string().when('pgpPrivateKey', { diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail.tsx index b8123c909..bac478e2d 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail.tsx @@ -38,7 +38,7 @@ const UserEmailSettings: React.FC = () => { pgpKey: Yup.string() .nullable() .matches( - /^-----BEGIN PGP PUBLIC KEY BLOCK-----.+-----END PGP PUBLIC KEY BLOCK-----$/, + /-----BEGIN PGP PUBLIC KEY BLOCK-----.+-----END PGP PUBLIC KEY BLOCK-----/s, intl.formatMessage(messages.validationPgpPublicKey) ), });