...
To make this work safely in the face of complex URLs, another script may be needed to sit between the application and the SP session initiator to doubly-encode the target resource into the "return" parameter to the validation script. An example is also attachedalso attached.
Configuration Reference
The filenames of the error templates to use are defaulted based on the kind of error, but can be overridden using the <Errors>
element as follows.
...