Skip to content
Myr

Don't passthrough_errors unless instructed. (#2006)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #2005 Revert #1679 and #1996

authored by Markus Unterwaditzer · committed by GitHub · parent ccd02bf · Browse files · 3 files+1 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+1 added−6 removed

  • tests:+0 added−2 removed
  • other:+1 added−4 removed

3 files+1 added−6 removed

modified:flask/app.py-2 removed
836 unmodified lines
837 if debug is not None:838 self.debug = bool(debug)839 options.setdefault('use_reloader', self.debug)840 options.setdefault('use_debugger', self.debug)841 options.setdefault('passthrough_errors',842 self.config['PROPAGATE_EXCEPTIONS'])841 try:842 run_simple(host, port, self, **options)843 finally:844 # reset the first request information if the development server
1146 unmodified lines
modified:flask/cli.py+1 added-2 removed
427 unmodified lines
428 if debug is not None:429 print(' * Forcing debug mode %s' % (debug and 'on' or 'off'))430431 run_simple(host, port, app, use_reloader=reload,432 use_debugger=debugger, threaded=with_threads,433 passthrough_errors=app.config['PROPAGATE_EXCEPTIONS'])432 use_debugger=debugger, threaded=with_threads)433434435@click.command('shell', short_help='Runs a shell in the app context.')436@with_appcontext
75 unmodified lines
modified:tests/test_basic.py-2 removed
1266 unmodified lines
1267 app = flask.Flask(__name__)1268 monkeypatch.setattr(werkzeug.serving, 'run_simple', run_simple_mock)1269 app.config['PROPAGATE_EXCEPTIONS'] = propagate_exceptions1270 app.run(debug=debug, use_debugger=use_debugger, use_reloader=use_reloader)1271 # make sure werkzeug passes errors through if PROPAGATE_EXCEPTIONS1272 assert rv['passthrough_errors'] == propagate_exceptions127112721273def test_max_content_length():1274 app = flask.Flask(__name__)
386 unmodified lines