google / exposure-notifications-verification-server

Verification component for COVID-19 Exposure Notifications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Admin UI Realm Settings SMS Template Invalid Form Validation

ae-wehealth opened this issue · comments

commented

TL;DR

while trying to setup the sms template with [enslink] tag the form validation fails with error: '"must contain exactly one of "[code]" or "[longcode]"'

Expected behavior

form should have been saved since [enslink] already includes the [longcode] ( please see below )

Observed behavior

validation error on Update SMS Settings & failed template save.

Reproduction

  1. I have attempted to setup new sms template for the user reports test at https://${SERVER}/realm/settings#sms
  2. I tried to create new SMS Template as following:
[enslink]
[longcode]
[longexpires] hours
  1. PreRender View displayed the message with the proper link at [enslink] tag:> https://us-az.verify.wehealth.org/v?c=7oXsNKhcSpCrpW 7oXsNKhcSpCrpW 24 hours
  2. UI Alerts received: Errors found for one or more SMS templates must contain exactly one of "[code]" or "[longcode]"

Screenshots

Screen Shot 2021-06-21 at 3 55 17 PM

Environment

  • GAEN v0.31.0
  • GCE/CLOUDRUN

Proposed Resolution

To extend the form validator to include [enslink].
The SMS template SHALL contain either the [code] or [longcode] or [enslink].

Additional information
We maintain GAEN systems for the State of Arizona & Bermudas.

[enslink] is only available if Exposure Notification Express is enabled on the realm.

A non EN Express application could enable this (under realm settings), but it will affix other settings in a manner consistent with the Apple and Google EN Express client implementations.

The bug here is actually in the preview, it shouldn't honor the tag if the realm can't use it.

Another note about EN Express mode - it will produce unexpected results on iOS if your application is not installed unless the Mobile App is registered correctly AND has "app store redirects" enabled.

commented

@mikehelmick : thanks for the clarification.
[enslink] is only available if Exposure Notification Express is enabled on the realm. - this tag appeared & populated automatically while creating the new sms template. We have ENX disabled on realm. However, both the enx_redirect_domain & enx_redirect_domain_map are configured via terraform.
The bug here is actually in the preview, it shouldn't honor the tag if the realm can't use it. -- the template did get saved actually even with the failed validation...
Screen Shot 2021-06-21 at 4 44 04 PM

Thanks for the update - we will address the validation issues and default template behavior.

@ae-wehealth

Please see the proposed changes in #2154