View Issue Details

IDProjectCategoryView StatusLast Update
0002960CCdcielGeneralpublic26-10-06 23:18
ReporterJan Dubovsky Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
Status newResolutionopen 
Summary0002960: Options dialog: PHD2/CdC/SMTP port fields accept any text, no numeric validation
DescriptionIn src/pu_options.pas, `PHDport`, `CdCport`, and `smtp_port` are plain
`TEdit` controls (not `TSpinEdit`), and their `.Text` is stored directly
into config (e.g. `config.SetValue('/Autoguider/PHDport', f_option.PHDport.Text)`)
with no `StrToIntDef` or range check anywhere along the way.

A user can type a non-numeric or out-of-range value into any of these
fields with no immediate feedback; the only symptom is an unexplained
connection failure to PHD2 / Cartes du Ciel / the SMTP server much later,
with nothing in the Options dialog pointing back at the invalid field.
Steps To Reproduce1. Open Options, go to the Autoguider (or Planetarium / Notification)
   page.
2. Type a non-numeric value into the PHD2 port, CdC port, or SMTP port
   field and save.
3. The dialog accepts it silently; the resulting connection failure gives
   no indication the port field is the cause.
Additional Information### Suggested fix

Use `TSpinEdit` for these fields (as already done elsewhere in the
project, e.g. pu_dark.lfm's Stackcount), or validate with
`StrToIntDef`/range-check before saving and show an inline error if the
value is invalid.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
26-10-06 23:18 Jan Dubovsky New Issue