Skip to content

Commit 257b8e0

Browse files
committed
apply_vars -> _apply_vars to avoid mapping to view; don't show db exception detail for security
1 parent 12b87c3 commit 257b8e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

uliweb_apijson/apijson/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __begin__(self):
2323
log.error("try to load json but get exception: '%s', request data: %s"%(e,request.data))
2424
return json({"code":400,"msg":"not json data in the request"})
2525

26-
def apply_vars(self):
26+
def _apply_vars(self):
2727
for key in self.request_data:
2828
if key[-1]=="@":
2929
k = self.request_data[key]
@@ -42,12 +42,12 @@ def get(self):
4242
else:
4343
rsp = self._get_one(key)
4444
if rsp: return rsp
45-
self.apply_vars()
45+
self._apply_vars()
4646
except Exception as e:
4747
err = "exception when handling 'apijson get': %s"%(e)
4848
log.error(err)
4949
traceback.print_exc()
50-
return json({"code":400,"msg":err})
50+
return json({"code":400,"msg":"get exception when handling 'apijson get',please check server side log"})
5151
return json(self.rdict)
5252

5353
def _get_one(self,key):

0 commit comments

Comments
 (0)