aerialship / SamlSPBundle

SAML 2.0 Symfony SP Bundle - new version available at
http://www.lightsaml.com/SP-Bundle/
MIT License
63 stars 43 forks source link

Template error: "Unknown "dump" function in "AerialShipSamlSPBundle::failure.html.twig" at line 7." #108

Closed osavchenko closed 8 years ago

osavchenko commented 8 years ago

I run my application in production mode but I got in error log such error:

request.CRITICAL: Uncaught PHP Exception Twig_Error_Syntax: "Unknown "dump" function in "AerialShipSamlSPBundle::failure.html.twig" at line 7." at /path/to/app/vendor/twig/twig/lib/Twig/ExpressionParser.php line 573 {"exception":"[object] (Twig_Error_Syntax(code: 0): Unknown \"dump\" function in \"AerialShipSamlSPBundle::failure.html.twig\" at line 7. at /path/to/app/vendor/twig/twig/lib/Twig/ExpressionParser.php:573)"} []

This error is connected with this line. Environment:

In dev environment all works well. Maybe we can avoid dump function and use something different?

i3or1s commented 8 years ago

this looks like a trailing error. I agree dump should not be there even if it is dev environment.

osavchenko commented 8 years ago

So, I can (and want) change it to something better, but I don't know what will be better in this case. Could you advice?

i3or1s commented 8 years ago

this shows up on AuthenticationException. I am still confused that it shows up in prod env since it is clearly happening only in dev {% if app.environment == 'dev' %}. There is already a stack-trace {{ error.getTraceAsString() }} so just remove the line, there is no point in printing object out.

More serious question is how did this line got into prod log.

i3or1s commented 8 years ago

Please also check the new version. New version of this library is in own organization: lightsaml/sp-bundle. More details on LightSAML website.

osavchenko commented 8 years ago

Thank you! New version is compatible with this one?

tmilos commented 8 years ago

New version is SAML 2.0 compatible just as this one, but the configuration of the bundle is not the same, and it has many new features, SAML SSO SP profile is moved to lightsaml/lightsaml core library together with core data models, then there's separate Symfony bridge bundle, and finally there's SP Bundle that depends on those two. Generally, think it's more simple now. Take a look at SAML Symfony Bundle getting started

Regarding this issue, have removed stack trace print and dump function usage in PR #112

osavchenko commented 8 years ago

Thank you