Skip to content

Commit

Permalink
fix(notif): loosen input validation on Pushover settings (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCatLady committed Mar 14, 2021
1 parent 36584ee commit 3148d31
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -41,13 +41,13 @@ const NotificationsPushover: React.FC = () => {
accessToken: Yup.string()
.required(intl.formatMessage(messages.validationAccessTokenRequired))
.matches(
/^a[A-Za-z0-9]{29}$/,
/^[a-z\d]{30}$/i,
intl.formatMessage(messages.validationAccessTokenRequired)
),
userToken: Yup.string()
.required(intl.formatMessage(messages.validationUserTokenRequired))
.matches(
/^[ug][A-Za-z0-9]{29}$/,
/^[a-z\d]{30}$/i,
intl.formatMessage(messages.validationUserTokenRequired)
),
});
Expand Down
Expand Up @@ -18,7 +18,7 @@ const messages = defineMessages({
botAPI: 'Bot Authentication Token',
chatId: 'Chat ID',
validationBotAPIRequired: 'You must provide a bot authentication token',
validationChatIdRequired: 'You must provide a chat ID',
validationChatIdRequired: 'You must provide a valid chat ID',
telegramsettingssaved: 'Telegram notification settings saved successfully!',
telegramsettingsfailed: 'Telegram notification settings failed to save.',
testsent: 'Test notification sent!',
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locale/en.json
Expand Up @@ -343,7 +343,7 @@
"components.Settings.Notifications.test": "Test",
"components.Settings.Notifications.testsent": "Test notification sent!",
"components.Settings.Notifications.validationBotAPIRequired": "You must provide a bot authentication token",
"components.Settings.Notifications.validationChatIdRequired": "You must provide a chat ID",
"components.Settings.Notifications.validationChatIdRequired": "You must provide a valid chat ID",
"components.Settings.Notifications.validationEmail": "You must provide a valid email address",
"components.Settings.Notifications.validationSmtpHostRequired": "You must provide an SMTP host",
"components.Settings.Notifications.validationSmtpPortRequired": "You must provide an SMTP port",
Expand Down

0 comments on commit 3148d31

Please sign in to comment.