telldus / tellstick-server-plugins

Plugins for TellStick Server
14 stars 8 forks source link

Mailsender local plugin broken #11

Closed jensah closed 3 years ago

jensah commented 4 years ago
port = ConfigurationString(
    defaultValue='25',
    title='SMTP server port',
    minLength=4

Due to minLenght 4 and default val 2 it breaks and won't work. Remove minLength=4 or atleast change to =2

edvarddrake commented 3 years ago

Furthermore, the minLength= 4 seems to translate into browser side validation against the pattern ".{4,0}", which generates an error, and probably fails completely. This means that the minLength=4 for smtpServer causes problems, too.

Removing both these constraints from the plugin probably solves the urgent problem (which makes the plugin completely useless). The way minLength is converted into validation pattern may be in the plugin mechanism, and probably needs a change too. But as a minimum solution, just bypassing it by not providing minLength may be simpler and quicker.

mickeprag commented 3 years ago

The correct fix must to be using ConfigurationNumber instead of ConfigurationString?

Fixed in fab725c60cb1a4a8d0adc4e599da8d4c6d989c65