File tree Expand file tree Collapse file tree 5 files changed +27
-6
lines changed
packages/bundled/securesync/devices Expand file tree Collapse file tree 5 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ Bug fixes
7070 * Redirect to front page if user logs in from the signup page :url-issue: `3926 `
7171 * Progress bar missing when decimals in progress percentage :url-issue: `5321 `
7272 * Missing cache invalidation for JavaScript meant client-side breakage: Upgraded CherryPy HTTP server to 3.3.0 :url-issue: `5317 `
73+ * Error pages now include Traceback information to include for technical support :url-issue: `5405 `
7374 * Implement friendlier user-facing error messages during unexpected JS failures :url-issue: `5123 `
7475 * Source distribution and `ka-lite ` + `ka-lite-raspberry-pi ` debian packages no longer ship with English content.db, means they have reduced ~40% in file size :url-issue: `5318 `
7576 * Installation works with latest ``setuptools >= 30.0 `` affecting almost any recent system using ``pip install ``. :url-issue: `5352 `
Original file line number Diff line number Diff line change 66{% block content %}
77 < h1 > {% trans "Error" %}</ h1 >
88
9- < p > < b > {% trans "Sorry, but there was an error while trying to load the page." %} </ b > </ p >
9+ {{ errormsg|safe }}
1010
11- ({{ errortype }}: {{ value }})
12- {% endblock content %}
11+ < p > {% trans "If you are reporting the error, please make sure to include the following information:" %}</ p >
12+
13+ < p > < textarea style ="width: 500px; max-width: 80%; height: 100px; font-family: monospace; " onclick ="$(this).height(400), $(this).width('100%'); this.select() "> URL: {{ request.path }}
14+ querystring: {{ request.GET }}
15+ {{ errortype }}: {{ value }}
16+
17+ {{ traceback }}</ textarea > </ p >
18+
19+ {% endblock content %}
Original file line number Diff line number Diff line change 66and more!
77"""
88import sys
9+ import traceback
10+
911from annoying .decorators import render_to
1012from annoying .functions import get_object_or_None
1113
@@ -277,8 +279,8 @@ def crypto_login(request):
277279
278280
279281def handler_403 (request , * args , ** kwargs ):
280- context = RequestContext (request )
281- #message = None # Need to retrieve, but can't figure it out yet.
282+ # context = RequestContext(request)
283+ # message = None # Need to retrieve, but can't figure it out yet.
282284
283285 if request .is_ajax ():
284286 return JsonResponseMessageError (_ ("You must be logged in with an account authorized to view this page (API)." ), status = 403 )
@@ -294,7 +296,10 @@ def handler_404(request):
294296def handler_500 (request ):
295297 errortype , value , tb = sys .exc_info ()
296298 context = {
299+ "request" : request ,
300+ "errormsg" : settings .AJAX_ERROR ,
297301 "errortype" : errortype .__name__ ,
298302 "value" : unicode (value ),
303+ "traceback" : traceback .format_exc (),
299304 }
300305 return HttpResponseServerError (render_to_string ("distributed/500.html" , context , context_instance = RequestContext (request )))
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ def initialize_registration():
4343@render_to ("securesync/register_public_key_client.html" )
4444def register_public_key_client (request ):
4545
46+ raise Exception ("Ben is testing" )
47+
4648 # Delete the registration state from the session to ensure it is refreshed next pageload
4749 del request .session ["registered" ]
4850
Original file line number Diff line number Diff line change 1- from django .conf import settings
1+ import requests
2+
23from django .test .utils import override_settings
34
45from fle_utils .internet .functions import am_i_online
@@ -20,6 +21,11 @@ def setUp(self):
2021 admin_data = {"username" : "admin" , "password" : "admin" }
2122 self .create_admin (** admin_data )
2223 self .client .login (** admin_data )
24+
25+ def test_online (self ):
26+ response = requests .get ("http://google.com" ,)
27+ google_is_online = response .status_code in (200 , 301 )
28+ self .assertEqual (am_i_online (), google_is_online )
2329
2430 @override_settings (CENTRAL_SERVER_URL = "http://127.0.0.1:8997" ) # We hope this is unreachable
2531 def test_not_redirected_when_offline (self ):
You can’t perform that action at this time.
0 commit comments