diff --git a/server/src/uds/REST/__init__.py b/server/src/uds/REST/__init__.py index 955d9fa72..31ec5baac 100644 --- a/server/src/uds/REST/__init__.py +++ b/server/src/uds/REST/__init__.py @@ -142,7 +142,7 @@ class Dispatcher(View): response[k] = val return response except RequestError as e: - return http.HttpResponseServerError(unicode(e)) + return http.HttpResponseBadRequest(unicode(e)) except ResponseError as e: return http.HttpResponseServerError(unicode(e)) except AccessDenied as e: diff --git a/server/src/uds/REST/methods/tickets.py b/server/src/uds/REST/methods/tickets.py index 74572e7c8..fde709ccd 100644 --- a/server/src/uds/REST/methods/tickets.py +++ b/server/src/uds/REST/methods/tickets.py @@ -129,6 +129,7 @@ class Tickets(Handler): groups = grps time = int(self._params.get('time', 60)) + time = 60 if time < 1 else time realname = self._params.get('realname', self._params['username']) servicePool = self._params.get('servicePool', None) transport = None