When a StaleStateException is raised, SQL parameters are always added to the exception message. As a result, sensible data may leak in the logs, without any option to turn it off (apart from hiding the exceptions, which does not sound like a good option)
Thanks yes then I agree, we shouldn’t log the parameters. Looks like this was introduced as .
I don’t think this should be based on the show_sql property though, that’s meant for a different aspect and it would be confusing to have it interact with this aspect.
I actually think we should never log parameters in the stacktrace of a StaleStateExceptionso we could keep it simple and avoid any configuration property?
I agree. Having the parameters logged somehow could be helpful but they probably should not be there by default. I’ll rework this issue.
I’ve created a PR:
Thanks a lot Sanne, that is really useful to my company (dealing with health care data)
Thanks to you for reporting it