Deluge: Ticket #2070: Webui spinners not validating user entries <p> I've been facing a number of problems regarding the Session Timeout setting of WebUI. Some of these problems render WebUI completely useless, forcing the user to hand-edit web.conf. Other issues involve usability problems. </p> <h1 id="Incorrectminimumvalue">Incorrect minimum value</h1> <p> The lowest specifiable timeout value is 0 seconds, making the user unable to carry out any actions after logging in. Anything below 1 minute shouldn't be allowed for practical reasons. </p> <p> According to the tests that I've done there's a threshold timeout value of about 90 seconds. If the timeout is set to anything less than or equal to this value then the login window will pop up directly after the login, not even waiting for this short timespan to time out. I've tried force-reloading the login page in order for the cookies to vanish but this always happened. The threshold value wasn't exact but 90 seconds should be in the ballpark. </p> <h1 id="Incorrectmaximumvalue">Incorrect maximum value</h1> <p> The maximum value that can be specified is 9999999999999 which makes the auth.login method responding with the following JSON: </p> <pre class="wiki">{"id": 4, "result": null, "error": {"message": "date value out of range", "code": 3}} </pre><p> and OverflowError gets thrown in the console: </p> <pre class="wiki">[ERROR ] 17:46:15 json_api:227 Error calling method `auth.check_session` [ERROR ] 17:46:15 json_api:228 date value out of range Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/deluge/ui/web/", line 219, in _handle_request result = self._exec_local(method, params, request) File "/usr/lib/python2.7/dist-packages/deluge/ui/web/", line 185, in _exec_local component.get("Auth").check_request(request, meth) File "/usr/lib/python2.7/dist-packages/deluge/ui/web/", line 231, in check_request expires, expires_str = make_expires(config["session_timeout"]) File "/usr/lib/python2.7/dist-packages/deluge/ui/web/", line 88, in make_expires expires = time.mktime(( + dt).timetuple()) OverflowError: date value out of range </pre><p> This makes login impossible. </p> <p> Currently 13 digits of seconds can be specified. If you limited the length to 11 digits you'd be safe because 99999999999 seconds wouldn't throw the above exception. 9 digits would probably be an even better choice considering that 999999999 seconds is ~32 years which should be well enough for everybody. </p> <p> A related disturbing issue is the maximum limit of 99999 seconds that is forced by the spinbutton control (which can be overridden by simply typing the desired value). This limit doesn't make any sense at all but it's disturbing because values larger than this limit get underlined with red zigzag line. I think this sipinbutton feature shouldn't be used at all in this case. </p> <h1 id="Impracticalunitofmeasure">Impractical unit of measure</h1> <p> Given that specifying anything under 1 minute doesn't make any practical sense and given that users hardly want to specify the timeout value by seconds it'd make a lot of sense to use a larger unit of measure instead of seconds like minutes. </p> <p> The most graceful solution would be to provide various units of measures, such as minute, hour, day, month and year but I understand if you don't wanna implement all this as it feels a bit overkill for such a simple feature. </p> <p> Whether you make the unit of measure choosable, the actual unit really should be displayed otherwise one cannot know for sure what unit you assume. </p> <h1 id="NoRememberforeveroption">No "Remember forever" option</h1> <p> Rather than expecting the user to specify a large-enough number that makes this feature happen, WebUI could provide an exact way to do that. </p> <p> Ideally a "Remember Forever" checkbox could be featured next to the timeout field. Upon checking it the spinbutton could get inactivated. </p> <p> Alternatively, you could expect the user to type the 0 value manually for this feature but in this case please make this crystal clear in the UI. </p> <p> Whatever way you choose to implement this, on the config file level the 0 value could be great for this purpose. </p> en-us Deluge Trac 1.0.9 Cas Wed, 28 Nov 2012 01:39:50 GMT milestone changed <ul> <li><strong>milestone</strong> changed from <em>Future</em> to <em>1.3.x</em> </li> </ul> <p> This is an issue in the way the actual spinner work however I think a check for isValid might be able to prevent values outside limits being set. Would need damoxc's input on how to fix. </p> Ticket Cas Tue, 11 Dec 2012 22:30:28 GMT summary, milestone changed <ul> <li><strong>summary</strong> changed from <em>Problems with the Session Timeout setting in WebUI</em> to <em>Webui spinners not validating user entries</em> </li> <li><strong>milestone</strong> changed from <em>1.3.x</em> to <em>1.4.0</em> </li> </ul> Ticket Cas Wed, 21 Jun 2017 09:24:17 GMT milestone changed <ul> <li><strong>milestone</strong> changed from <em>2.0.x</em> to <em>2.x</em> </li> </ul> <p> Milestone renamed </p> Ticket