ncssar / radiolog

SAR radio log program
Other
13 stars 3 forks source link

fleetsync send console - device ID validation passes when blank #660

Closed caver456 closed 10 months ago

caver456 commented 1 year ago

Fleet ID validation fails as expected when blank, but Device ID validation passes when blank. If you put some invalid text in Device ID(s) then validation does fail correctly.

caver456 commented 10 months ago

For 'Get Radio Location', the existing validator does catch blank device ID, since it must be exactly four digits. But for 'Send Text Message', blank device ID passes validation. In other words, this piece of code is never triggered:

if not self.ui.deviceField.hasAcceptableInput():
   if sendText:
      invalidMsg+='\n - Device ID(s) must be a four-digit integer, or a comma-separated or space-separated list of four-digit integers'

Probably the validator regex needs improvement.

caver456 commented 10 months ago

Validator fixed - there's still the problem of the message box showing 'FleetSync data sent to 123:12345' when actually sending NEXEDGE - but that's a different topic, and not a very high priority - changing the guts of the message code is too invasive for this particular issue