seamapi / public-tracker

0 stars 0 forks source link

Access code updates can fail for a device if a code is externally modified with a PIN value that already exists as a Seam access code #83

Closed mc2147 closed 5 months ago

mc2147 commented 6 months ago

Prerequisites

Description

We have an internal rule in our Seam code that prevents two access codes with the same PIN code from existing on the same device. If this error condition is triggered, we assume it's an error in our access code update and this can cause a failure to update in our other access codes as well.

This rule can be triggered if a user externally modifies a code and sets the PIN to a value that is already being used by another Seam access code.

E.g.

Steps to Reproduce

  1. Create multiple access codes for a device on Seam
  2. Externally modify an access code to have the same PIN value as another Seam access code
  3. Access codes can stop syncing properly for the device

Expected behavior: update should succeed, but warning should be placed on the externally modified access code indicating that it is a duplicate code

Actual behavior: update fails and access codes can stop syncing properly for the device