Merge branch 'hotfix/5374-cleanup'

Fix CS and testing issues introduced by security fix for #5374
CS fixes

- trailing whitespace
Merge branch 'hotfix/cs' into develop

Fixes CS issues