On 09/16/2011 11:47 AM, Thomas Mortagne wrote:
> Hi devs,
>
> Right now it's pretty dangerous to manipulate script services from Velocity.
>
> If even you try to get a service that does not exist that will produce
> an exception which will kill your script for good. It's a pain to have
> use case like using a service only if it's here and fallback on
> something else otherwise.
>
> For example even if you disabled CSRF XWiki will fill in many places
> if you even think or removing the csrf jar. That seems pretty bad to
> me.
>
> The exception does not bring much value to scripts here (even for
> scripts supporting it) so I proposed to return null instead of
> throwing an exception.
>
> WDYT ?
>
> Here is my +1.
>

+1 as well.

Should there be a WARN log entry as well? I'd say no, since it will fill 
the logs needlessly.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to