class Kemal::ExceptionPage

Defined in:

kemal/helpers/exception_page.cr

Constructors

Class Method Summary

Instance Method Summary

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.


[View source]

Class Method Detail

def self.for_production_exception #

[View source]

Instance Method Detail

def project_url #
Description copied from class ExceptionPage

Add an optional link to your project


[View source]
def styles : ExceptionPage::Styles #

[View source]