We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There appear to be unhandled exceptions when likely introduced when error handlers wher
404
500
It seems related to an apparmor issue, the application is trying to redirect to error.html:
journalist-error.log:
[Fri Jul 12 11:32:13.705153 2019] [wsgi:error] [pid 961:tid 4014428063488] ERROR:flask.app:Exception on /favicon.ico [GET] [Fri Jul 12 11:32:13.705183 2019] [wsgi:error] [pid 961:tid 4014428063488] Traceback (most recent call last): [Fri Jul 12 11:32:13.705200 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2292, in wsgi_app [Fri Jul 12 11:32:13.705206 2019] [wsgi:error] [pid 961:tid 4014428063488] response = self.full_dispatch_request() [Fri Jul 12 11:32:13.705211 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request [Fri Jul 12 11:32:13.705215 2019] [wsgi:error] [pid 961:tid 4014428063488] rv = self.handle_user_exception(e) [Fri Jul 12 11:32:13.705220 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1713, in handle_user_exception [Fri Jul 12 11:32:13.705225 2019] [wsgi:error] [pid 961:tid 4014428063488] return self.handle_http_exception(e) [Fri Jul 12 11:32:13.705229 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1644, in handle_http_exception [Fri Jul 12 11:32:13.706406 2019] [wsgi:error] [pid 961:tid 4014428063488] return handler(e) [Fri Jul 12 11:32:13.706415 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/var/www/securedrop/journalist_app/__init__.py", line 104, in _handle_http_exception [Fri Jul 12 11:32:13.706421 2019] [wsgi:error] [pid 961:tid 4014428063488] return render_template('error.html', error=error), error.code [Fri Jul 12 11:32:13.706426 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 134, in render_template [Fri Jul 12 11:32:13.706431 2019] [wsgi:error] [pid 961:tid 4014428063488] return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list), [Fri Jul 12 11:32:13.706436 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 869, in get_or_select_template [Fri Jul 12 11:32:13.706441 2019] [wsgi:error] [pid 961:tid 4014428063488] return self.get_template(template_name_or_list, parent, globals) [Fri Jul 12 11:32:13.706446 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 830, in get_template [Fri Jul 12 11:32:13.706451 2019] [wsgi:error] [pid 961:tid 4014428063488] return self._load_template(name, self.make_globals(globals)) [Fri Jul 12 11:32:13.706456 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 804, in _load_template [Fri Jul 12 11:32:13.706461 2019] [wsgi:error] [pid 961:tid 4014428063488] template = self.loader.load(self, name, globals) [Fri Jul 12 11:32:13.706466 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/jinja2/loaders.py", line 113, in load [Fri Jul 12 11:32:13.706471 2019] [wsgi:error] [pid 961:tid 4014428063488] source, filename, uptodate = self.get_source(environment, name) [Fri Jul 12 11:32:13.706476 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 58, in get_source [Fri Jul 12 11:32:13.706482 2019] [wsgi:error] [pid 961:tid 4014428063488] return self._get_source_fast(environment, template) [Fri Jul 12 11:32:13.706486 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 83, in _get_source_fast [Fri Jul 12 11:32:13.706492 2019] [wsgi:error] [pid 961:tid 4014428063488] return loader.get_source(environment, template) [Fri Jul 12 11:32:13.706496 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/jinja2/loaders.py", line 171, in get_source [Fri Jul 12 11:32:13.706501 2019] [wsgi:error] [pid 961:tid 4014428063488] f = open_if_exists(filename) [Fri Jul 12 11:32:13.706506 2019] [wsgi:error] [pid 961:tid 4014428063488] File "/usr/local/lib/python2.7/dist-packages/jinja2/utils.py", line 154, in open_if_exists [Fri Jul 12 11:32:13.706511 2019] [wsgi:error] [pid 961:tid 4014428063488] return open(filename, mode) [Fri Jul 12 11:32:13.706523 2019] [wsgi:error] [pid 961:tid 4014428063488] IOError: [Errno 13] Permission denied: '/var/www/securedrop/journalist_templates/error.html' [Fri Jul 12 11:32:13.706852 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] mod_wsgi (pid=961): Exception occurred processing WSGI script '/var/www/journalist.wsgi'. [Fri Jul 12 11:32:13.706894 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] Traceback (most recent call last): [Fri Jul 12 11:32:13.706913 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2309, in __call__ [Fri Jul 12 11:32:13.706941 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] return self.wsgi_app(environ, start_response) [Fri Jul 12 11:32:13.706952 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2295, in wsgi_app [Fri Jul 12 11:32:13.706968 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] response = self.handle_exception(e) [Fri Jul 12 11:32:13.706977 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1748, in handle_exception [Fri Jul 12 11:32:13.706993 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] return self.finalize_request(handler(e), from_error_handler=True) [Fri Jul 12 11:32:13.707002 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] File "/var/www/securedrop/journalist_app/__init__.py", line 100, in _handle_http_exception [Fri Jul 12 11:32:13.707018 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] handler = list(app.error_handler_spec['api'][error.code].values())[0] [Fri Jul 12 11:32:13.707035 2019] [wsgi:error] [pid 961:tid 4014428063488] [remote 127.0.0.1:17852] AttributeError: 'exceptions.IOError' object has no attribute 'code'
kern.log:
Jul 12 11:32:13 app kernel: [ 1855.913553] audit: type=1400 audit(1562945533.700:15): apparmor="DENIED" operation="open" profile="/usr/sbin/apache2" name="/var/www/securedrop/journalist_templates/error.html" pid=1115 comm="apache2" requested_mask="r" denied_mask="r" fsuid=33 ouid=33
The text was updated successfully, but these errors were encountered:
@emkll Couldn't reproduce it on my local. Are you sure this still exists?
Sorry, something went wrong.
This was fixed in #5088.
No branches or pull requests
Description
There appear to be unhandled exceptions when likely introduced when error handlers wher
Steps to Reproduce
Expected Behavior
404
Actual Behavior
500
Comments
It seems related to an apparmor issue, the application is trying to redirect to error.html:
journalist-error.log:
kern.log:
The text was updated successfully, but these errors were encountered: