class
Kemal::ExceptionPage
- Kemal::ExceptionPage
- ExceptionPage
- Reference
- Object
Defined in:
kemal/helpers/exception_page.crConstructors
-
.new(context : HTTP::Server::Context, exception : Exception)
The
exception_pageshard renders some values without escaping them, in the<title>element and in the heading right below it.
Class Method Summary
Instance Method Summary
-
#project_url
Add an optional link to your project
- #styles : ExceptionPage::Styles
Constructor Detail
def self.new(context : HTTP::Server::Context, exception : Exception)
#
The exception_page shard renders some values without escaping them, in
the <title> element and in the heading right below it. Two of them are
attacker controlled: the request path, and the exception message, which
applications commonly build from user input (raise "User #{name} not found"). Escape them here, before they reach the template, so the
development error page can't be turned into a reflected XSS.