so right off the bat we are telling folks that if they need to use this,
that you should just ignore the warnings in the Javadoc. If the Javadoc
*is* accurate, then we are setting a bad precedent, telling developers
to "pay no attention to the warning labels". If the Javadoc is not accurate,
then at a minimum, let's fix the Javadoc as playing Chicken Little is almost
equally bad.
From manico.james@gmail.com on November 03, 2010 06:01:13
ESAPI.override( new DefaultSecurityConfiguration() );
which according to the Javadoc says:
Overrides the current security configuration with a new
implementation. This is meant to be used as a temporary means to alter
the behavior of the ESAPI and should NEVER be used in a production
environment as it will affect the behavior and configuration of the
ESAPI GLOBALLY.
is a poorly designed / implemented singleton as it has TWO public CTORs!
I think this is just asking for problems. Is it supposed to be a singleton or
not. If it is, the CTORs should be private (and there is little reason for
two of them). If it doesn't need to be a singleton, then I could stand behind
these changes if DefaultSecurityConfiguration was rewritten so that it did
not have to be a singleton. (I did not reinspect its source code that
carefully, so for the moment at least, I am not making any judgment how
difficult this is.) But I don't think we can have it both ways. If it is
supposed to be a singleton, then calling a public CTOR could have undesired
side-effects. Has anyone checked to see if this is OK? \
Original issue: http://code.google.com/p/owasp-esapi-java/issues/detail?id=170