UMDLARS / dtanm

A framework to teach adversarial thinking to software developers without requiring any special security knowledge
3 stars 2 forks source link

Add better error pages #119

Open ChandlerSwift opened 3 years ago

ChandlerSwift commented 3 years ago

In many cases, when a 401, 403, or 404 should be presented, a non-formatted and not-very-helpful error page is shown.

For example, here's an attack that doesn't exist: 20210131_15h58m05s_grim

These should be formatted nicely, and contain helpful text where possible. Using get_or_404 may get us a lot of the way there, in combination with a nice 404 page.

ChandlerSwift commented 3 years ago

https://flask.palletsprojects.com/en/1.1.x/errorhandling/

jnowaczek commented 3 years ago

PR #130 includes 404 handlers for teams and attacks. I wasn't sure what situations might cause 401s, 403s, or other 404s so I chose not to add Flask app wide handlers since they wouldn't have any helpful information in them. Are there cases where these other errors occur?