Combo init checker Creates log Gets json from request Runs input through check many Makes it safe to call dict['value'] directory from input And still pases "untrusted_input" in case we want values that aren't being checked
(request,
spec_list,
untrusted_input = None,
string_len_not_zero = True
)
| 270 | |
| 271 | |
| 272 | def master(request, |
| 273 | spec_list, |
| 274 | untrusted_input = None, |
| 275 | string_len_not_zero = True |
| 276 | ): |
| 277 | """ |
| 278 | Combo init checker |
| 279 | |
| 280 | Creates log |
| 281 | Gets json from request |
| 282 | Runs input through check many |
| 283 | |
| 284 | Makes it safe to call dict['value'] directory from input |
| 285 | And still pases "untrusted_input" in case we want values that |
| 286 | aren't being checked |
| 287 | |
| 288 | """ |
| 289 | |
| 290 | log = regular_log.default_api_log() |
| 291 | |
| 292 | if untrusted_input is None: |
| 293 | try: |
| 294 | untrusted_input = request.get_json(force = True) |
| 295 | # see http://flask.pocoo.org/docs/1.0/api/#flask.Request.get_json |
| 296 | except: |
| 297 | log["error"]["input"] = "Expecting json in request" |
| 298 | return log, None, None |
| 299 | |
| 300 | log, input = input_check_many(spec_list = spec_list, |
| 301 | log = log, |
| 302 | untrusted_input = untrusted_input, |
| 303 | string_len_not_zero = string_len_not_zero) |
| 304 | |
| 305 | return log, input, untrusted_input |
nothing calls this directly
no test coverage detected