def csrf_view(context, request): if request.method not in safe_methods and ( callback is None or callback(request) ): check_csrf_origin(request, raises=True) check_csrf_token(request, token, header, raises=True) return view(context, request)
def csrf_view(context, request): if ( request.method not in safe_methods and (callback is None or callback(request)) ): check_csrf_origin(request, raises=True) check_csrf_token(request, token, header, raises=True) return view(context, request)
def _callFUT(self, *args, **kwargs): from pyramid.csrf import check_csrf_origin return check_csrf_origin(*args, **kwargs)
def receive_file(request): if request.authenticated_userid: check_csrf_origin(request) and check_csrf_token(request) upload = Upload.save_from(request, 'files[]') return {'upload_id': upload.id}
def _callFUT(self, *args, **kwargs): from pyramid.csrf import check_csrf_origin return check_csrf_origin(*args, **kwargs)
def receive_file(request): if request.authenticated_userid: check_csrf_origin(request) and check_csrf_token(request) upload = Upload.save_from(request, 'files[]') return {'upload_id': upload.id}